This article is part of the WordPress Forensics series — practical guides for WordPress security, recovery, and migration.
Introduction
Your WordPress site is slow. You have tried caching plugins. You have upgraded hosting. It is still slow. The problem is that you are treating symptoms, not causes. This guide teaches you to diagnose performance issues at the source — the same forensics approach we use on client sites.
Establishing Baselines
Tools for Measurement
- Google PageSpeed Insights — Core Web Vitals, mobile/desktop
- GTmetrix — Waterfall analysis, historical tracking
- WebPageTest — Multiple locations, detailed timing
- Query Monitor plugin — Database queries, hooks, HTTP calls
- Chrome DevTools — Network panel, Performance panel
Key Metrics to Track
- Time to First Byte (TTFB) — Server response time
- Largest Contentful Paint (LCP) — Main content load time
- First Input Delay (FID) — Interactivity delay
- Cumulative Layout Shift (CLS) — Visual stability
- Total page size — All resources combined
- Number of requests — HTTP requests to load page
Database Performance Issues
Symptoms
- High TTFB (> 600ms)
- Slow admin dashboard
- Timeout errors during peak traffic
Common Causes
- Bloated wp_options table — Autoloaded options over 1MB
- Post revisions — Thousands of revision records
- Transients — Expired transients never cleaned
- Orphaned metadata — Meta for deleted posts/users
- Plugin data — Abandoned plugin tables
Diagnostic Queries
-- Check autoloaded options size
SELECT SUM(LENGTH(option_value)) as autoload_size
FROM wp_options WHERE autoload = 'yes';
-- Count post revisions
SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision';
-- Find largest options
SELECT option_name, LENGTH(option_value) as size
FROM wp_options ORDER BY size DESC LIMIT 20;
Plugin Performance Issues
Symptoms
- Slow page loads across entire site
- Specific pages much slower than others
- High CPU usage
Diagnosing Plugin Impact
- Install Query Monitor plugin
- Note baseline queries and load time
- Deactivate plugins one by one
- Measure after each deactivation
- Identify the culprit(s)
Common Plugin Offenders
- Page builders loading on every page
- Social sharing plugins with API calls
- Analytics plugins not using async
- Related posts plugins with complex queries
- Broken plugins making failed HTTP requests
Theme Performance Issues
Common Theme Problems
- Unoptimized images in theme assets
- Excessive Google Fonts loading
- Render-blocking CSS/JS
- Inefficient template queries
- No lazy loading implemented
Theme Forensics
- Switch to default theme (Twenty Twenty-Four)
- Measure performance difference
- If significantly faster, theme is the issue
- Review theme's functions.php for inefficient code
- Check for direct database queries in templates
Hosting and Server Issues
Symptoms
- Consistently high TTFB regardless of page
- Performance degrades during traffic spikes
- Slow even with caching enabled
Hosting Factors
- Shared hosting overload — Too many sites on server
- PHP version — PHP 7.4 is 3x slower than 8.2
- OPcache disabled — PHP recompiling on every request
- Insufficient memory — PHP memory limit too low
- Disk I/O bottleneck — Slow storage
- Geographic distance — Server far from users
Caching Misconfigurations
Why Caching Is Not Working
- Logged-in users bypassing cache
- WooCommerce cart/checkout not excluded properly
- Cache lifetime too short
- Browser caching not configured
- CDN not properly integrated
- Object caching not enabled
Caching Verification
- Check HTTP headers for cache status
- Verify cache files exist on disk
- Test as logged-out user in incognito
- Use curl to check response headers
Image and Media Issues
Common Problems
- Uncompressed images (5MB+ files)
- Wrong format (PNG for photos, JPEG for graphics)
- No WebP/AVIF serving
- Images not sized correctly (serving 4000px for 400px container)
- No lazy loading for below-fold images
Image Audit
- Check largest images in uploads directory
- Review srcset implementation
- Verify lazy loading is active
- Test WebP delivery
JavaScript and CSS Issues
Blocking Resources
- Render-blocking scripts in head
- Excessive inline CSS
- Unused CSS loaded on every page
- Third-party scripts blocking render
JS/CSS Forensics
- Review Coverage panel in Chrome DevTools
- Identify unused CSS/JS percentage
- Check for duplicate libraries (multiple jQuery versions)
- Audit third-party scripts impact
Performance Remediation Priorities
- Server/Hosting — Foundation must be solid
- Database — Clean and optimize
- Caching — Implement properly
- Images — Compress and lazy load
- Plugins — Remove or replace slow ones
- Theme — Optimize or replace
- JS/CSS — Defer, async, minify
Conclusion
Performance optimization without diagnosis is guesswork. Use forensics to identify the actual bottlenecks, prioritize by impact, and measure results. A fast WordPress site is possible — but only if you treat the causes, not just the symptoms.