When a WordPress site scores well in tools like GTMetrix but still feels slow to real users, the issue usually lies beyond simple metrics. That was exactly the challenge in this case.
The goal was to perform a diagnostic-first performance audit, identify real bottlenecks, and implement targeted optimizations without relying on heavy optimization plugins like NitroPack or Airlift.
Issue Background
The site showed strong performance scores in GTMetrix, but real users experienced noticeable slowness. Independent tests produced inconsistent results, which reduced trust in performance reporting.
The task focused on validating the issue, identifying root causes, and implementing lightweight optimizations before introducing third-party optimization tools.
Diagnosis
Debug mode running in production
The site had debugging enabled in wp-config.php:
define('WP_DEBUG', true);
define('SCRIPT_DEBUG', true);
define('WP_DEBUG_LOG', true);
This resulted in continuous logging, a very large debug file, and unnecessary overhead on uncached requests.
Duplicate lazy-loading systems
The site used both WP Rocket lazy loading and a manually injected lazysizes.min.js script in the theme, causing conflicts and delayed image rendering.
Inefficient font loading
Fonts were loaded using @import, which delayed font discovery and caused visible layout shifts. Multiple plugins also loaded Google Fonts, increasing overhead.
Heavy frontend asset stack
The theme globally enqueued a large number of legacy scripts, including Modernizr, Respond, Font Awesome, iCheck, Chosen, bxSlider, and Slick. Over 70 script requests were detected on some pages.
WooCommerce assets loading sitewide
WooCommerce scripts and styles were loaded on pages where they were not needed, adding unnecessary weight to non-commerce content.
Resolution Steps
Disable debug mode
define('WP_DEBUG', false);
define('SCRIPT_DEBUG', false);
define('WP_DEBUG_LOG', false);
This removed logging overhead and improved performance on uncached requests.
Remove duplicate lazy loading
The manually added lazysizes.min.js script was removed so WP Rocket could handle lazy loading consistently.
Optimize Google Fonts loading
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=...">
This improved font loading speed and reduced layout shifts.
Conditionally load WooCommerce assets
add_action('wp_enqueue_scripts', function () {
if (!is_cart() && !is_checkout() && !is_account_page()) {
wp_dequeue_style('woocommerce-general');
wp_dequeue_script('wc-add-to-cart');
}
}, 99);
This reduced page weight on non-commerce pages.
Clear and validate cache
Caches were cleared across WP Rocket, object cache, and edge layers to ensure accurate performance testing.
Final Outcome
After implementing these changes, cached pages loaded in under one second, Time to First Byte improved, and overall user experience became significantly faster and more consistent.
The site now performs well both in testing tools and in real-world usage.
If your site feels slow despite strong performance scores, the issue is often caused by hidden inefficiencies rather than obvious bottlenecks. Addressing these underlying problems leads to more reliable and sustainable performance improvements.
If you need help diagnosing WordPress performance issues or optimizing site speed, our team can help.