AAA Option Optimizer
AAA Option Optimizer

AAA Option Optimizer

Joost de Valk

This plugin tracks which of the autoloaded options are used on a page, and stores that data at the end of page render. It keeps an array of options that it has seen as being used. On the admin page, it compares all the autoloaded options to the array of stored options, and shows the autoloaded options that have not been used as you were browsing the site. If you’ve been to every page on your site, or you’ve kept the plugin around for a week or so, this means that those options probably don’t need to be autoloaded.

How to use this plugin

Install this plugin, and go through your entire site. Best is to use it normally for a couple of days, or to visit every page on your site and in your admin manually. Then go to the plugin’s settings screen, and go through the unused options. You can either decide to remove an unused option (they might for instance be for plugins you no longer use), or to set it to not autoload. The latter action is much less destructive: it’ll still be there, but it just won’t be autoloaded.

Why the AAA prefix in the plugin name?

Because the plugin needs to measure options being loaded, it benefits from being loaded itself first. As WordPress loads plugins alphabetically,
starting the name with AAA made sense.

Do I need to take precautions?

Yes!! Backup your database.

Where can I report bugs?

Please use our GitHub for reporting bugs or making code suggestions. Feel free to use the forums for asking questions too, of course.

For security issues, please see the next question.

How can I add recognized plugins?

Please do a pull request via GitHub on this file in the plugin.

How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.

Awesome

By websuper on September 18, 2024

One of the most useful plugin ever. Thank you

Almost!

By Thomas (thomhsb) on September 12, 2024

This plugin could be great if you could do batch deletion. Be able to tick off the lines to be deleted and then click on a button to remove the whole thing. Also, with a search (example: "ar_%"), we could delete everything a plugin has left in the options at once. In short, a recently used plugin has left me dozens of useless options, and having to delete them one by one is time-consuming.

Perfect!

By Leandro Lima (leandrvs) on September 9, 2024

Deactivated unused options with confidence! Great tool to minimize autoloaded data size!

Very useful

By slservice33 on August 20, 2024

I've go hundreds of unused auto loaded options on mysite & with Joosts kind help I can safely unload them all without fear of breaking my site.

And I can easily set them to autoload again if necessary.

Great plugin! I was able to fix site health warning

By ghiblimagic on August 15, 2024

Great plugin! With it i was able to see a theme I deleted a while ago, Astra, was taking up a lot of space in the options table. With it I was able to delete it and now the site health warning about a large options table is gone.

Works fine!

By apapac on August 13, 2024

Found many unused autoloaded options from many plugins I had tested but uninstalled, like Yoast and RankMath, and uninstalled them. My site loads 0.5 sec faster.

Nice

By Vu Tru So (vutruso) on July 30, 2024

Nice plugin, thank you.

First (Incredible!) plugin for actual database cleanup

By fazh on April 27, 2024

Just wow. I've been looking for something like this for years. Big thanks to the author and please keep it up!

Delete unused Options with Confidence

By shirtguy72 on April 19, 2024

Years of trying out different themes and plugins built up nearly 2000 auto loaded options. Tried other tools in the past to clean this mess, not being a developer by any means, maybe an "Intermediate Idiot" would best describe my WP knowledge?... I would always end up deleting something I shouldn't have, break the site, get frustrated and do a full restore from a backup, and those 2000 auto loaded options would sit there, haunting me...

Until NOW!!!! This takes the guesswork out!

It was like performing an Options Exorcism! :)

Great tool to minimize autoloaded data size

By Rogier Lankhorst (RogierLankhorst) on April 19, 2024

And I love the speed in which improvements are made :)

1.2.1

  • Fix error in known-plugins.json.
  • Prevent fatal error when there’s an error in known-plugins.json.

1.2

Enhancements:

  • Overhaul of the UX, implementing proper tabs, better buttons and more.
  • Added a new “All options” tab, which, when you hit the button, loads all the options from the database and allows you to manage them.
  • Added a “Reset data” button which resets the tracking data.
  • Added a link to the Optimize Options page from the Plugins page.
  • Much improved recognition of core WordPress options, themes and plugins under “Source”, thanks in part to pull requests from Rogier Lankhorst and system4pc.
  • You can now also filter all tables by Source so you can more easily find the options you’re looking for.
  • Many code and speed improvements under the hood, including adding a class autoloader and some i18n fixes.

1.1.1

Implement the missing functionality to create an option with value false when it’s being loaded but doesn’t exist.

1.1

The plugin now recognizes plugins from which the options came (thanks to a great pull by Rogier Lankhorst). If you’re a plugin developer and want your plugin’s options
properly recognized, please do a pull request on this file.

Small enhancements:

  • Column width is now automatically determined which leads to better spacing.
  • Action buttons are now centered in their columns.

Bugs fixed:

  • If you removed autoload from or deleted an option, it’d be removed from the table but would be back when you paginated, that’s fixed – thanks to Jono Alderson for reporting.
  • Fixed sorting by filesize by moving the KB to the table heading, so that you can now properly sort numbers.
  • Fixed issue where an empty option would result in weird size output.

1.0.2

  • Fixed a bug where the buttons wouldn’t work in a paginated state.
  • Show the value of an option in a popover, as suggested with a great pull request by @rogierlankhorst.

1.0.1

Fixed an error with values that are objects, not strings, which also caused sorting not to work for some people.

1.0

Initial release on GitHub and WordPress.org.

  1. Search for AAA Option Optimizer on the repository.
  2. Install the plugin.
  3. Wait a week or so. Or, if you’re in a hurry, click around on pages on your site, be sure to try and hit every page on your site and in your admin.
  4. Go to the plugin’s admin page and optimize your option usage.

Reviews

4.8 out of 5 stars

  • Version: 1.2.1
  • Last updated: 5 months ago
  • Active installations: 2K
  • WordPress version: 6.2
  • Tested up to: 6.5.5
  • PHP version: 7.4