WordPress Performance: WordPress Plugin Performance

9 minute read WordPress Performance · Part 4

Discover how to identify slow plugins, reduce overhead, and follow best practices for writing or choosing performance-optimised WordPress plugins.

Plugins can make or break your site’s speed. Poorly coded or bloated plugins are a common bottleneck. This guide shows how to measure, audit, and improve plugin performance.

1. Identify Heavy Plugins

Use diagnostic tools:

  • Query Monitor (plugin)
  • New Relic APM
  • P3 Profiler (legacy)

Key things to check:

  • Load time impact
  • DB queries introduced
  • Memory footprint
  • Script and style enqueues

2. Remove or Replace Poor Plugins

Look for:

  • Outdated codebases
  • Redundant plugins
  • Overlapping features (e.g., SEO, security)

Replace bloated all-in-ones with focused tools:

  • Use Antispam Bee over Akismet + Jetpack
  • Use Simple SEO instead of large SEO suites

3. Defer or Conditionally Load Plugins

Use is_admin() and conditional logic to avoid frontend bloat:

if ( ! is_admin() && ! is_user_logged_in() ) {
  remove_action( 'wp_enqueue_scripts', 'plugin_script_loader' );
}

Use the Plugin Organizer plugin for rule-based control over load scope.

4. Audit Scripts and Styles

Use wp_dequeue_script() and wp_dequeue_style() to remove unwanted assets:

function dequeue_unused_assets() {
    wp_dequeue_script( 'some-plugin-script' );
    wp_dequeue_style( 'some-plugin-style' );
}
add_action( 'wp_enqueue_scripts', 'dequeue_unused_assets', 100 );

5. Lazy Load Plugin Features

Only trigger plugin logic when needed. For example:

if ( is_product() ) {
    my_custom_plugin_function();
}

Or lazy load modules via autoloading structure.

6. Avoid Plugin Duplication

Avoid stacking multiple plugins that rely on similar APIs or third-party calls.

Common examples:

  • Multiple social share tools
  • Analytics tracking overlaps
  • Font loading from different sources

Real-World Result

In a large membership site refactor:

  • Removed 6 plugins and replaced with 2 custom ones
  • Reduced front-end script load by 40%
  • Database queries cut from 140 to 70 per page load