Find unused WordPress plugins

Published Updated 3 min read

Inherit a WordPress site and the plugin list is often a graveyard of things nobody remembers installing. Twenty, thirty, forty active plugins, each adding load time and attack surface, and plenty of them almost certainly doing nothing visible any more.

WordPress gives you no way to tell which still matter. A plugin that once powered a shortcode on a page deleted two years ago looks exactly like the one running your checkout today. Deactivate the wrong one and something breaks; leave them all and the site stays slow and exposed.

A small audit tool replaces blind guessing with evidence. It looks for traces each plugin leaves in the database, and the plugins that leave none are the first ones worth investigating.

How a plugin list fills up

A developer installs something for a one-off problem; the problem goes, the plugin stays. A migration pulls in compatibility shims that were needed for a month. A client asks for a feature, the agency installs a plugin, the feature comes off the page and the plugin stays active.

Nobody tracks any of it. The plugin list shows name, version and status, and nothing about whether a plugin has touched a post, holds content in a custom post type, or has settings someone configured. So on an inherited site the safe move is to leave everything on, and every extra plugin stays a potential conflict, a security surface and a drag on performance.

Traces a plugin leaves in the database

Tools > Plugin Usage Audit runs its checks when you press Run Scan. For each active plugin it counts the rows in wp_options whose name contains the plugin's folder name. Most plugins that have been configured or used write at least one, so zero suggests it was never set up.

It also counts published posts whose content contains the folder name, which catches shortcodes, block names and custom HTML following the plugin's naming. It is not exhaustive, but a plugin whose shortcodes appear in dozens of posts is not unused. A plugin with zero in both columns gets a 'No signals' flag.

Below the table, a list of every non-built-in custom post type with its post count lets you cross-check the plugins you know register CPTs. A CPT with no posts means its plugin has done no content work on this site.

Hook-based plugins look unused and are not

Caching, security firewalls, login protection, SEO, redirects and analytics all work by hooking into WordPress at runtime. They put nothing in post content and often name their options differently from their folder. They will all show 'No signals', and not one of them is safe to remove on that basis.

The options match is approximate too. A short or generic folder name throws up false positives; a plugin that prefixes its options with something unrelated to its folder gives a false negative.

Treat the result as a shortlist, not a verdict. For a zero-signal plugin you do not recognise, read its description, check when it last touched anything, then deactivate it on a staging copy, one plugin at a time, checking the site after each. It may be a dependency of another plugin or work through hooks the scan cannot see.

Widgets, multisite and a record over time

Widget-only plugins are another blind spot, because widget settings sit in wp_options under sidebars_widgets and widget_* keys rather than in posts. On multisite, the scan only looks at the current site. A follow-up message can add a widget usage section, a network mode that walks every site with get_sites(), or a CSV export so you can compare today's scan with one from three months ago and see whether the flagged plugins were actually cleaned up.

What you get

Included

  • Admin page at Tools > Plugin Usage Audit with on-demand scan
  • Per-plugin wp_options row count to detect whether settings were ever stored
  • Per-plugin post content search to detect shortcodes and block name references
  • Non-built-in custom post type list with post counts for manual cross-reference
  • 'No signals' flag for plugins with zero evidence in both database checks

Not included

  • Hook-based plugins: caching, security, SEO, firewall, redirects will always show zero
  • Plugins whose option names do not match their folder name
  • Widget-based plugins not referenced in post content
  • Definitive safety confirmation: a zero-signal plugin may still be a required dependency
  • Automated deactivation or deletion — the tool reports only, changes nothing

Questions

Is it safe to run the scan on a live site?

Yes. It only reads the database and changes nothing, and it runs when you press the button, not on every page load, so visitors are unaffected.

A plugin shows signals but I do not recognise it. What should I do?

Read its description and settings page to see what it does, and look at which posts the content matches are in. If those posts are live and in use, the plugin is probably still doing a job, even if you did not install it.

Build it in Steem

The button opens the builder with this guide's prompt filled in, so you can change anything before it runs. Nothing is built, and nothing is charged, until you send it.

Build this pluginAbout 55 credits. The free plan includes enough for one.
Read the prompt (336 words)

Build a WordPress plugin called Plugin Usage Audit. Plugin Name: Plugin Usage Audit. Description: Scans active plugins for database and content signals to help identify possibly unused ones. Single PHP file. No external dependencies. Register an admin page under the Tools menu using add_management_page. Page title: Plugin Usage Audit. Menu title: Plugin Usage Audit. Capability: manage_options. Slug: plugin-usage-audit. On the page, render a Run Scan button that submits a GET request to the same page with query parameter run=1. Only execute the scan when that parameter is present and current_user_can('manage_options') is true. When the scan runs: 1. Get all installed plugins using get_plugins(). Filter to active plugins using is_plugin_active(). For each active plugin path (e.g. 'woocommerce/woocommerce.php'), derive the slug as the directory name: the portion before the first slash. 2. For each plugin slug, run two wpdb queries: a. Options count: SELECT COUNT(*) FROM {$wpdb->options} WHERE option_name LIKE %s, with value '%' . $wpdb->esc_like($slug) . '%'. b. Post count: SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_content LIKE %s, with value '%' . $wpdb->esc_like($slug) . '%'. 3. Build an array of result rows. Sort so that plugins where both counts are zero appear first. 4. Render an HTML table with columns: Plugin Name, Options Matches, Post Content Matches, Signal. In the Signal column, output the text 'No signals' in red (#cc0000) if both counts are zero; otherwise output 'Signals found' in green (#006600). 5. Below the table, add an h2 heading Custom Post Types and a second table listing all post types returned by get_post_types(array('_builtin' => false), 'objects'). For each, show: Label, Slug, and Published Posts count from wp_count_posts($post_type->name)->publish. 6. Above the main table, output a standard WordPress admin notice with class notice notice-warning: 'This scan cannot detect hook-based plugins such as caching, security, firewall, SEO, or redirect plugins. Those will always show zero signals. Use this as a starting point, not a final verdict.' Apply the standard WordPress admin table classes wp-list-table widefat fixed striped to both tables. No external CSS or JavaScript.