From wordpress-expert
Analyzes WordPress performance across database queries, PHP execution, frontend rendering, and caching layers. Use when investigating slow pages, optimizing load times, or reviewing caching strategy.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wordpress-expert:performanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Identify N+1 query patterns (queries inside loops)
meta_query without proper indexingLIKE '%value%' queries (leading wildcard prevents index use)wp_options autoloading (total autoloaded data size)SELECT * where specific columns would sufficeORDER BY RAND() on large datasetswp_postmeta table bloatinit, wp_loaded, or admin_init hooks that should run conditionallyget_option() on non-autoloaded options (each triggers a DB query)wp_enqueue_script() / wp_enqueue_style() (not hardcoded in templates)in_footer parameter)# Analyze autoloaded options size
wp db query "SELECT option_name, LENGTH(option_value) as size FROM wp_options WHERE autoload='yes' ORDER BY size DESC LIMIT 20;"
# Count orphaned transients
wp db query "SELECT COUNT(*) FROM wp_postmeta WHERE meta_key LIKE '_transient_%';"
# Count post revisions
wp db query "SELECT COUNT(*) FROM wp_posts WHERE post_type='revision';"
# Analyze wp_postmeta table size
wp db query "SELECT COUNT(*) as total_rows, SUM(LENGTH(meta_value)) as total_size FROM wp_postmeta;"
# Find slow queries (requires query log enabled)
wp db query "SELECT * FROM mysql.slow_log ORDER BY query_time DESC LIMIT 10;"
# Database optimization
wp db optimize
wp db repair
# Transient cleanup
wp transient delete --expired
wp transient delete --all
# Cron inspection
wp cron event list
wp cron schedule list
# Cache management
wp cache flush
wp cache type # Show cache type (Redis, Memcached, etc.)
# Enable Query Monitor plugin for development
wp plugin install query-monitor --activate
# Check for slow queries in debug log
tail -f /path/to/wp-content/debug.log | grep "Slow query"
npx claudepluginhub dr-robert-li/cowork-wordpress-expertReviews WordPress PHP code for performance anti-patterns in queries, hooks, caching, AJAX, and templates. Use for auditing themes/plugins, optimizing WP_Query, or diagnosing slow loads/timeouts.
Reviews WordPress architecture for CPT misuse patterns (dead CPTs, data-store abuse), hook abuse (excessive callbacks, expensive init hooks, priority conflicts), and caching anti-patterns (missing object cache, permanent transients).
Optimizes WordPress performance: profiles slow queries, N+1 problems, autoload bloat, object cache, Core Web Vitals, and bundling. Use before blind optimization.