You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin performs a query on every request that is expensive when under load:
SELECT ID FROM $wpdb->posts WHERE post_status IN ('pitch', 'a
ssigned', 'in-progress', 'approved', 'member', 'staff', 'prem
ium') LIMIT 1
The plugin also updates the option presspermit_legacy_status_control on every page
load if certain conditions are met. Neither this query nor this option update will
scale for moderate to large sites, handling similar sized loads.
The plugin could be refactored to ensure that the option is only updated when it is
first set or when a specific condition changes. One approach is to move these
expensive operations out of the plugins_loaded callback logic and instead put them
somewhere where they will only run once, like when the plugin is activated.
Making sure that the query and option update only run once, rather than on every
page load, will help ensure that sites with lots of data and moderate to heavy
traffic can still leverage the Pro modules like Status Control without experiencing
performance degradation.
The text was updated successfully, but these errors were encountered:
From the WordPress VIP team:
The text was updated successfully, but these errors were encountered: