Menu

Autoload isn't the problem. One plugin is: how I measure cost per plugin
📰

Autoload isn't the problem. One plugin is: how I measure cost per plugin

DEV Community: php·Juande·3 days ago
#ImQ5OWUz
#devto#dev#plugin#autoload#option
Long article (1127 words) — no AI summary yet.
Reading 0:00
15s threshold

Site Health told me the site had a problem. It didn't tell me whose problem it was.

Since WordPress 6.6, Site Health has a check called "Autoloaded options could affect performance". It adds up every autoloaded option and, once the total reaches 800,000 bytes, flags it as a critical issue. That's useful. But in every slow site I've looked at, the next question is always the same: which plugin put that data there, and what else is it costing me?

A single number can't answer that. So I stopped looking at totals and started building a cost-per-plugin table : one row per plugin, with its autoloaded bytes, its own database tables, its cron events and its scheduled actions. Here's how to do it by hand with SQL and WP-CLI, and the traps I fell into along the way.

Step 0: know what "autoloaded" means after 6.6

WordPress 6.6 changed the values in the autoload column. Old sites still have yes and no ; newer writes use on , off , auto , auto-on and auto-off .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.