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.
npx claudepluginhub dr-robert-li/cowork-wordpress-expertThis skill uses the workspace's default tool permissions.
- Identify N+1 query patterns (queries inside loops)
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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"