Skip to main content

Plugin Audit

A plugin audit is how you keep WordPress fast over time: you inventory what is installed, measure what it loads, and remove or unload what isn't needed. Use this before launch and quarterly (or after adding a feature plugin).

caution

Do audits on staging first. Disable one plugin at a time, purge caches, and re-test critical routes (login, search, cart/checkout, forms).

What You Need

  • WP-CLI access (SSH or hosting terminal)
  • A short list of URLs to test (homepage, one post, one heavy template, and checkout/account if applicable)
  • Chrome DevTools; optional: Query Monitor

Inventory Plugins (WP-CLI)

wp-plugin-inventory.sh
cd /var/www/html # replace with your WordPress docroot
wp plugin list
wp-active-plugins.sh
wp plugin list --status=active

Disk footprint is a quick bloat smell test:

plugin-disk-usage.sh
du -sh wp-content/plugins/* | sort -h

Find Front-End Bloat (DevTools)

  1. Open the page in an incognito window.
  2. DevTools -> Network -> Disable cache -> Reload.
  3. Filter for .js and .css and look for plugin paths:
plugin-asset-paths.txt
/wp-content/plugins/contact-form-7/includes/js/scripts.js
/wp-content/plugins/elementor/assets/js/frontend.min.js

If a plugin loads on pages where it isn't needed, unloading it per-route is often safer than replacing it.

Find Back-End and DB Cost (Query Monitor)

Query Monitor can attribute database queries to a plugin/component:

queries-by-component-example.txt
woocommerce 28 queries (0.42s)
some-plugin 12 queries (0.31s)

Use this to decide whether you need a different plugin, a configuration change, object caching, or (when proven by logs) a targeted index.

Change Workflow (Safe)

  1. Pick one candidate (duplicated feature, sitewide assets, heavy queries).

  2. Disable it:

    disable-plugin.sh
    wp plugin deactivate plugin-slug
  3. Purge caches (server/CDN) and re-test the same URLs.

  4. If the site is stable and faster, remove it and document why:

    remove-plugin.sh
    wp plugin delete plugin-slug

Implementation Steps (Hands-On)

  1. Navigate to root:

    plugin-audit-example-4.sh
    cd /var/www/html
  2. List plugins:

    plugin-audit-example-5.sh
    wp plugin list
  3. Check plugin sizes:

    plugin-audit-example-6.sh
    du -sh wp-content/plugins/*
  4. Deactivate unused/bloated:

    plugin-audit-example-7.sh
    wp plugin deactivate elementor
  5. Reload with DevTools and Query Monitor.

  6. Compare before/after PageSpeed Insights results.

  7. Document your plugin stack (role + reason each plugin is installed).

Go-Live Checks

  • Plugin roles documented (what each plugin does)
  • No duplicated plugins (two SEO plugins, two caching plugins, etc.)
  • DevTools confirms heavy plugin JS/CSS is not loaded sitewide
  • Query Monitor shows no obvious slow query hotspots on key pages
  • Checkout/forms/login tested end-to-end after changes

What's Next