How to Identify Slow WordPress Plugins (Performance Diagnosis Guide)

Learn how to identify slow WordPress plugins causing high CPU, slow loading, or PHP-FPM spikes. Includes server-side tools and real performance tips.

Slow WordPress plugins are one of the most common reasons for high CPU usage, slow page loads, and even server-side errors. When a plugin runs expensive queries or heavy background tasks, it can overload PHP-FPM or MySQL. In this guide, you’ll learn how to identify slow plugins using both WordPress tools and server-level diagnostics so you can fix performance issues before they become major problems.

Table of Contents

Slow WordPress plugins are behind many of the VPS performance issues people experience — high CPU usage, slow page loads, PHP-FPM spikes, and even 504 Gateway Timeout errors. A single inefficient plugin can overwhelm your entire server, especially on smaller VPS instances.

In this guide, we’ll walk through several reliable ways to identify slow plugins using both WordPress tools and server-level diagnostics on Ubuntu. This approach works on any stack, including Nginx, PHP-FPM, MariaDB, Virtualmin, or a manual LEMP server.

Why Plugins Slow Down a WordPress Site

A slow plugin can cause issues in multiple layers of the server stack:

1. PHP layer

  • Heavy plugin code

  • Slow loops

  • High PHP-FPM worker time

  • Excessive autoloading

2. Database layer

  • Large or unindexed queries

  • Too many meta lookups

  • WooCommerce product queries

  • Cron jobs fetching remote data

3. WordPress hooks

  • Plugins hooked to init, wp_head, or the_content

  • Unoptimized admin-side actions

  • High-frequency AJAX calls

4. Network layer

  • Remote API calls

  • Tracking scripts

  • External requests with slow response times

Identifying the source helps you decide whether to optimize, replace, or remove the plugin.

Step 1: Use Query Monitor (Best WordPress Plugin for Diagnosis)

Query Monitor is the most powerful WordPress debugging tool available.

Once installed:

  1. Login to WordPress Admin

  2. Visit any slow page

  3. Open the Query Monitor panel

  4. Review these sections:

✔ Slowest database queries

Shows which plugin is generating expensive SELECT queries.

✔ PHP errors & warnings

Unoptimized plugins often trigger warnings.

✔ Scripts & styles

If a plugin loads many CSS/JS files, load time increases.

✔ Hooks & actions

Shows what executes on each request.

Query Monitor highlights each plugin’s impact, making it easy to spot bottlenecks.

Tip: Always test both the frontend and the WordPress admin dashboard — some plugins behave differently in each environment.

Step 2: Use WP-CLI to Profile Plugin Performance

On Ubuntu or any VPS:

List installed plugins:

				
					wp plugin list
				
			

Temporarily disable all plugins (diagnostic mode):

				
					wp plugin deactivate --all
				
			

Then enable them one by one:

				
					wp plugin activate plugin-name
				
			

Reload your site after each activation.

If the site becomes slow after enabling a plugin → you found the culprit.

This is very effective when:

  • WordPress admin is slow

  • WooCommerce backend lags

  • A plugin locks backend operations

Step 3: Use Server Logs to Determine Slow Plugins

When plugins overload PHP-FPM, worker processes slow down or crash.

Check PHP-FPM slow log:

				
					grep -r "slow" /var/log/php*
				
			

Or:

				
					tail -n 50 /var/log/php8.1-fpm.log
				
			

Look for lines like:

				
					script_filename = /home/example/public_html/wp-content/plugins/plugin-name/
				
			

This tells you exactly which plugin was running when PHP-FPM exceeded its performance threshold.

If you see repeated slow logs from the same plugin → remove or replace it.

Step 4: Monitor Resource Usage with htop

Open:

				
					htop
				
			

Sort by CPU% or MEM%.

If PHP-FPM spikes to 100% when performing:

  • WooCommerce actions

  • Bulk edits

  • Import scripts

  • Custom plugin actions

Then the plugin responsible is running slow code.

Tip:

Watch in real-time while performing admin actions like:

  • Saving posts

  • Updating products

  • Running imports

  • Accessing plugin dashboards

You will quickly spot CPU-heavy plugins.

Step 5: Check MySQL Slow Query Log

Enable slow query log:

				
					nano /etc/mysql/mariadb.conf.d/50-server.cnf
				
			

Enable:

				
					slow_query_log = 1
long_query_time = 1
				
			

Restart:

				
					systemctl restart mysql
				
			

Then view:

				
					tail -n 50 /var/log/mysql/mysql-slow.log
				
			

If you see paths like:

				
					.../wp-content/plugins/plugin-name/
				
			

Or unoptimized meta queries with high execution times, the plugin is likely the cause.

Database-heavy plugins include:

  • WooCommerce

  • wpDiscuz

  • SEO plugins

  • Membership plugins

  • Reporting/analytics plugins

Step 6: Disable Background Tasks (Cron Jobs)

Many slowdowns happen in the background, not during a page load.

Plugins that often trigger scheduled tasks:

  • Backups

  • SEO crawlers

  • WooCommerce analytics

  • Security scans

  • Email marketing plugins

Check scheduled events:

				
					wp cron event list
				
			

Look for tasks containing plugin names that run too often.

Slow CRON tasks = slow server.

Step 7: Check for PHP-FPM Worker Exhaustion

Sometimes plugins overload memory, causing PHP-FPM to run out of workers.

Check worker usage:

				
					systemctl status php8.1-fpm
				
			

Or:

				
					ps aux | grep php-fpm
				
			

👉 If PHP-FPM continues to spike due to low memory, consider adding swap space — it can stabilize your server during plugin-heavy tasks.

Step 8: Compare Plugin Performance with Debug Bar

Another great tool is:

				
					Debug Bar
Debug Bar Slow Actions
				
			

These show:

  • Slow hooks

  • Long-running functions

  • Plugins delaying the request lifecycle

This is especially useful for:

  • WooCommerce

  • Membership plugins

  • SEO plugins

  • Builders (Elementor, Divi, WPBakery)

When Should You Remove or Replace a Plugin?

Remove a plugin when:

  • It consistently shows in slow logs

  • It generates unoptimized DB queries

  • It triggers high CPU spikes

  • It delays admin dashboard loading

  • It causes PHP-FPM timeouts

  • It slows down cron jobs

You may need to replace it with lighter alternatives.

Conclusion

Identifying slow WordPress plugins requires a combination of WordPress tools and server-side diagnostics, but once you know where the bottleneck is, performance improvements become much easier.

Query Monitor, WP-CLI, PHP-FPM logs, and MySQL slow query logs provide a complete picture of what’s slowing down your site.

If you continue experiencing performance issues, the next step is analyzing MySQL bottlenecks, which we will cover tomorrow.

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button