Performance: Plugin database tables
HIGH IMPACT
This affects page load speed and server response time by influencing database query performance and data retrieval efficiency.
CREATE TABLE wp_plugin_data (id INT PRIMARY KEY, data TEXT, INDEX(data(10))); -- Plugin queries use indexed columns and cache results
CREATE TABLE wp_plugin_data (id INT, data TEXT);
-- Plugin runs many unindexed queries on this table for every page load| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Unindexed large plugin tables | N/A (server-side) | N/A | Delays initial paint by 200-500ms | [X] Bad |
| Indexed plugin tables with caching | N/A (server-side) | N/A | Reduces paint delay to under 100ms | [OK] Good |
| Large autoloaded options in wp_options | N/A (server-side) | N/A | Adds 100-300ms delay to first paint | [X] Bad |
| Non-autoloaded options or custom tables | N/A (server-side) | N/A | Speeds up first paint by avoiding unnecessary data load | [OK] Good |