I am facing a severe performance issue on a WordPress site where the Case Study listing page (/case-study/) takes 60+ seconds to load, while individual Case Study detail pages load normally (~500 ms).
I have investigated this using Query Monitor, and the results are confusing because database performance looks fine.
Environment
WordPress (latest)
Custom theme + child theme
Plugin heavily involved:
enovathemes-addonsPage builder based layout
PHP with OPcache enabled
APCu installed and APCu Object Cache plugin enabled
Observed behavior
/case-study/(listing page): ~63 seconds page generation time/case-study/single-post/: ~512 msFrontend network requests load normally once the page responds
Query Monitor results
Page Generation Time: 63.13s
Database Queries: 223 queries
Total DB time: ~0.8s
Peak Memory Usage: ~32 MB
HTTP API calls: None
Object Cache hit rate: ~93%
Persistent object cache: Enabled (APCu)
Despite enabling APCu, there is no noticeable performance improvement.
Errors / Warnings
Query Monitor shows repeated PHP warnings during page load:
Warning: Attempt to read property "guid" on null
wp-content/plugins/enovathemes-addons/shortcodes/shortcodes.php
This warning appears multiple times while rendering the Case Study listing page.Relevant code snippet (shortcode function)
The plugin uses shortcodes to render elements like logos. One example:
$logo = get_post($logo);
$logo_src = $logo->guid;
get_post() sometimes returns null, but the code accesses $logo->guid without validation.
There are also calls like:
file_get_contents($logo->guid);