humanmade / humanmade/protected-embeds
DB queries on admin_init.
- Dominant language
- PHP
- Stars
- 11
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The code is currently running a query to create a DB table if doesn't already exist on `admin_init`.
https://github.com/humanmade/protected-embeds/blob/32f1e61af00d8ab0e86764b29e87077956911515/protected-embeds.php#L14
Due to how often `admin_init` is triggered this is potentially creating a large number of unnecessary queries, for instance we have literally seen the `create_database_table()` function called millions of times in a single day on one of our big sites.
It would be more efficient to check the table exists on activation and upgrade rather than on every admin action.
Please give me a shout if you would like me to work on this with you.
Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.