Installing a plugin takes a few seconds. Removing it often means data migration, template fixes and database cleanup. That’s why one of the decisions that most determines a site’s maintenance cost, attack surface and page speed is made at install time. Below, we explain step by step the technical criteria to check before installing a new plugin, how to keep the existing inventory and how to remove an unnecessary plugin without leaving a trace.
Plugin quality, not plugin count
There’s no technical answer to “how many plugins is too many?” Fifteen plugins that each do only their own job and load their files only on the pages that need them can be lighter than a single plugin that adds scripts to every page and bloats autoloaded options by megabytes. Look at these four impacts, not the count:
- Runtime cost: PHP code running on every request, database queries, external HTTP requests.
- Front-end cost: CSS and JavaScript added to the page, fonts, third-party calls.
- Security surface: AJAX and REST endpoints the plugin opens, file upload functions, permission checks.
- Maintenance dependency: The developer’s continuity, license renewal, version compatibility with other plugins.
The same view also clarifies the decision “a plugin for a single function, or a few lines of code?” Instead of installing a plugin to hide an admin menu or add a header, writing a few lines in an mu-plugin file under version control is often less risky. The reverse is also true: rewriting complex functions such as payments or multilingual support in custom code produces more technical debt than a maintained plugin. The measure is the complexity of the function.
Plugin assessment criteria table
Below is the skeleton of the form to fill in when a new plugin is proposed. Each row is marked “accept”, “conditional accept” or “reject”. A single reject row can be enough to eliminate the plugin.
| Criterion | Where to look | Warning sign |
|---|---|---|
| Maintenance frequency | WordPress.org page, changelog | No release for a long time, “Tested up to” is old |
| Support behavior | Support forum, issue tracker | No response to security reports |
| Security history | WPScan, Patchstack, Wordfence vulnerability databases | Recurring vulnerabilities that are fixed late |
| Code quality | Source code review | Missing nonce and permission checks, raw SQL |
| Asset loading | Browser network tab | Scripts and styles loaded on every page |
| Database footprint | Before/after installation comparison | Large autoloaded options, unbounded log table |
| License and sustainability | License terms, vendor | Updates stop when the annual license expires |
| Exit cost | Data model and shortcodes | Custom shortcodes embedded in content, closed data format |
In a code review, checking a few concrete points often gives a good enough picture: nonce checks with check_ajax_referer() or wp_verify_nonce() in form and AJAX handlers, permission checks with current_user_can(), $wpdb->prepare() in queries, a permission_callback that isn’t left empty on REST routes, and esc_html() and esc_attr() on output. These are the basic security practices defined in the WordPress Plugin Handbook. Their absence is a serious sign.
The “exit cost” row is the one most often skipped and the one that backfires most expensively. When a plugin that places hundreds of shortcodes in content is removed, those codes appear as plain text on the pages: a service page that reads [example_shortcode id="12"]. Before installing, answer in writing: “what happens if we want to remove this in two years?”
Measuring the performance impact
A plugin’s impact is determined by measurement, not guesswork; the measurement is made in the test environment with real content. Three layers are examined.
Server side: Query Monitor groups queries and PHP times by the component they come from; it can be enabled temporarily in the test environment and removed after measurement. On the command line, wp-cli/profile-command, a separate WP-CLI package, can be used:
# Install the profile command (one time)
wp package install wp-cli/profile-command
# Duration and query count of the loading stages
wp profile stage --fields=stage,time,query_count
# The most expensive hooks
wp profile hook --all --spotlight --orderby=time
# Total size of autoloaded options and the largest ones
wp db query "SELECT option_name, LENGTH(option_value) AS size
FROM $(wp db prefix)options
WHERE autoload IN ('yes','on','auto','auto-on')
ORDER BY size DESC LIMIT 20;"
The autoload values in the last query were deliberately kept broad: since WordPress 6.6, the values on, off, auto, auto-on and auto-off are used alongside yes/no. If these options, loaded into memory on every request, carry a plugin’s cache or log data, every page load slows down. This is the picture we see most often in the field: the problem isn’t on the page but in wp_options.
Front end: The network tab of the browser developer tools for the same page is compared with the plugin enabled and disabled. Check especially whether files are loaded on pages where the function isn’t used (a form plugin’s files on pages without a form).
Database: The outputs of wp db tables --all-tables-with-prefix, wp option list --fields=option_name and wp cron event list are taken before and after installation and compared. The tables, options and scheduled jobs the plugin creates are written into the inventory from the start; when removing it, what needs cleaning is known. For general settings at the database layer, the PHP-FPM and MariaDB performance guide is complementary.
Plugin inventory and ownership record
The inventory isn’t a copy of the plugin list; it’s the record that says why each plugin is there. Recommended fields:
- Plugin name and slug, source (WordPress.org, commercial vendor, custom development)
- The business function it provides and the pages where it’s used
- Business owner (the person who decides the function is needed)
- Technical owner, license expiry date and the email the license account is tied to
- Criticality class and automatic update status
- Tables, options and cron jobs it creates, and shortcodes used in content
- Last review date
Don’t leave the license email field empty. A license tied to a departed employee’s mailbox means the renewal warning reaches no one.
The technical part can be produced regularly with WP-CLI. In Multisite, network-active plugins and site-active plugins must be listed separately:
# Single site
wp plugin list --fields=name,status,version,update,auto_update --format=csv > inventory.csv
# Multisite: network-active and must-use (mu) plugins
wp plugin list --status=active-network --fields=name,version
wp plugin list --status=must-use --fields=name,version
# Multisite: active plugins of a specific subsite
wp plugin list --status=active --url=sub.example.com --fields=name,version
The outputs are moved into version control or a shared document; the business owner, license and rationale fields have to be filled in by hand. For corporate websites, reviewing the inventory every three months is a reasonable starting rhythm.
Weeding out abandoned and unnecessary plugins
In the review, three questions are asked of each plugin: Is it still maintained? Is its function still used? Does another plugin do the same job?
Signs of an abandoned plugin: The plugin page being closed on WordPress.org (the directory doesn’t always explain the reason for closure; it may be a security issue), no release for a long time, the “Tested up to” value being several major versions behind, unanswered security questions in the support forum. On the commercial side, the vendor discontinuing the product or the license expiring falls into the same category. The update column in the wp plugin list output shows whether there’s a new version in the directory; but seeing “no update” on an old plugin may mean it’s no longer developed rather than up to date. Don’t miss this distinction.
Plugins with overlapping functions: Common cases in the field: two separate cache plugins, similar widgets in the page builder and in a separate add-on pack, a sitemap plugin installed separately while an SEO plugin is present, two different SMTP plugins. One is chosen, the other’s functions are moved and it’s dropped from the inventory. Two cache plugins don’t work together.
Unused function: Plugins installed for a campaign and forgotten once it ends. To find their use in content, shortcodes and block names can be searched for in the database; for example wp db search '[example_shortcode' --all-tables or wp post list --post_type=any --s=example_shortcode --fields=ID,post_title. A plugin with no usage isn’t deactivated and left waiting; it’s backed up and removed with the steps below.
Steps for safely removing a plugin
Removal starts with a change record and in the test environment:
- Backup: A database backup is taken with
wp db export, along with an archive of the plugin folder. - Dependency check: Shortcodes, blocks and Elementor widgets in content and function calls on the theme side are searched for. If the theme code calls a plugin function directly, the site goes down with a fatal error when the plugin is removed.
- Deactivation and observation: It’s turned off with
wp plugin deactivate <plugin>, and the relevant pages and forms are tested in the test environment. For critical functions, leaving it deactivated on the live site for a while is also an option. - Removal:
wp plugin uninstall <plugin>runs the plugin’s own uninstall routine (uninstall.phpor the uninstall hook) and deletes the files. It fails on an active plugin; deactivate it first or use the--deactivateoption. Not every plugin has an uninstall routine; and some of those that do delete data only if a setting like “delete data on uninstall” is enabled. - Cleaning up leftovers: The tables, options and cron jobs written into the inventory at installation are checked. Leftovers are listed first, then deleted one by one:
wp option delete <option>,wp cron event delete <hook>. For tables,wp db query "DROP TABLE ..."is run only after verifying that the table doesn’t belong to another plugin. - Verification: The PHP error log, cache clearing and a visual check of the relevant pages.
In Multisite, plugin tables may have been created separately for each subsite with subsite prefixes (for example wp_2_). Cleanup is checked separately on each subsite; checking the main site and stopping there is half the job. Command details are in the wp plugin command reference.
Making the process sustainable
The inventory is a prerequisite of the update process: on a site where nobody knows what was installed and why, update testing is incomplete too. That’s why the inventory should also be the source of the critical plugin list in the WordPress update policy. When custom code and plugin dependencies accumulated over the years turn into technical debt, the technical debt inventory approach gives a broader framework. Teams who want inventory and simplification included in their maintenance scope can see the WordPress security and maintenance service, and those who want to reduce plugin dependency with custom code can see the WordPress and Elementor development page.
Frequently asked questions
How many plugins should a WordPress site have?
There’s no right number. What decides it is the code the plugins run on every request, the files they load, the trace they leave in the database and their maintenance status. A few badly written plugins cause more problems than many lightweight ones.
What’s the downside of keeping a deactivated plugin without deleting it?
As long as the files stay on the server, some vulnerabilities can be exploited by sending requests directly to the plugin files. Updating deactivated plugins is also neglected in practice. Back up and delete unused plugins.
Does the wp plugin uninstall command delete all of a plugin’s data?
Not always. The command runs the plugin’s own uninstall routine and deletes the files; the plugin decides what gets deleted from the database. Many plugins deliberately leave data behind. Remaining tables, options and cron jobs should be checked separately.
How can I tell if a free plugin has been abandoned?
Strong signs are the WordPress.org page being closed, no releases for a long time, the WordPress version it was tested with being several major versions behind and security questions in the support forum going unanswered.