Options and Metadata Usage Monitoring
WordPress gives a lot of freedom to plugins and themes to handle their settings, work with metadata and anything else. And, there are numerous ways the plugins do that, making it very hard to know exactly which options or metadata belong to specific plugin or theme, or are used by plugins and themes.
SweepPress has several methods to identify options and metadata, as it listed here, and the most advanced method is the last one listed there: Usage Monitoring.
How Usage Monitoring Works
SweepPress has two monitoring methods. Both of these methods involve hooks into WordPress core functionalities, and they both will add some overhead to each page request, and they can add some performance hit to the overall page load speed.
- Monitor Updates: plugin will be hooked into WordPress actions that are fired when the options and metadata functions are called to save options and metadata. These methods are not run too often, and they will not affect WordPress loading in any significant way.
- Monitor Reading: plugin will be hooked into WordPress actions that are fired when the options and metadata functions for reading options and metadata. Because reading of options and metadata happens hundreds of times on every page load, this method can slow down page loading, because SweepPress monitor code will be executed every time options or metadata are accessed.
Because of the way this monitoring works, SweepPress can get the options and metadata usage with the highest degree of precision, and will be sure if some options and metadata are used.
There is one problem with using this feature. It will start monitoring after
plugins_loadedaction was fired, and some of the plugins that have maybe loaded their settings before that, will not be monitored and their options (mostly this) or metadata would not be detected this way. To get around this, the monitoring feature can be loaded in a High Availability mode, but that would require some custom coding and changes. More about that, you can learn in this article.
Third Party Plugins Support
The monitoring system relies on the use of WordPress options and metadata functions to work. This should work for all the plugins that use these functions. If the plugin works with options or metadata without using WordPress functions for this purpose, SweepPress can’t detect the proper usage of the options or metadata.
- Advanced Custom Fields (Free or Pro): any fields added by this plugin will be detected by SweepPress on metadata Update. To make sure that SweepPress captures the meta fields registered by the ACF plugin, you need to open any post using ACF fields, and save it. On save Update Usage Monitoring will pick up all the fields. If you use many ACF groups assigned to different post types, or options or other ACF used groups, you need to save at least one post or page where ACF is used to make sure ACF triggers update for the data, and SweepPress will be able to pick up the fields.
- GD Content Tools Pro: this Dev4Press owned plugin registers all the meta fields for all active meta boxes with SweepPress, and SweepPress will easily detect those meta keys. The only thing you need is to use latest SweepPress Pro version and GD Content Tools Pro 6.3 or newer for this feature to work.
More information about some specific third party plugins will be added here, in the future. If you are using some plugin that is not properly detected by SweepPress, let us know via support forums.
Recommendations for using this feature
This will get you the most precise information about the plugins and themes using options and metadata, and that information will be a crucial to decide what you want to remove from the database. But, this feature will affect website loading speed, so it is not advisable to have it running all the time.
- When you decide you want to cleanup the options and metadata tables, you should enable this feature and leave it active for 5 to 10 days. In that period, use your website normally. Only after that, you should have enough data to be certain that all options and metadata used are identified, and if you still see Unknown records, it means that they can be removed.
- For best results, you should use both Updates and Reading monitors, even with higher performance impact that Reading monitor adds. The data gathered with both methods will be most complete set possible, and typically, you can have this feature active for 2 to 4 days with Reading monitor used.
- After you run this feature for sufficient number of days, before you get to deletion of data, make sure that you have the backup of all your data ready. After you remove records using Options or Metadata panels, retest your website as much as possible to make sure nothing of value is removed. Backup will be insurance that you can go back.
- To improve the process, it is highly recommended to go through all the plugins you have on the website, visit their settings pages, and simply resave the settings without making changes. This will help SweepPress to pick up even more results.
Best way to do safe cleanup, is to use staging copy of the website. You should run monitoring on the live website, but after you do that, make the staging copy, run the cleanup to and test to confirm that all is OK. Only after that, you can switch back to live website and remove same options and meta key records as you did on staging.
Usage Monitor Settings
By default, usage monitoring is enabled, and you have additional options to enable monitoring of Updates and/or Reading. All these settings are in the Settings -> Meta & Options panel.

Important Notices
- In some cases, usage monitor will not be able to find exactly where the options or metadata was requested, because some data access can be done via objects like
WP_UserorWP_Postthat access the data on behalf of the plugin or theme, In that case, some options or metadata can be marked as accessed by WordPress Core, but it does not invalidate the approach, because the options and metadata are still correctly identified as ‘in use’, and will be safe from deletion. - The performance impact of the
UpdatesUsage Monitor is very small, adding about 1% to 2% to the overall page loading time.ReadingUsage Monitor can increase overall page loading time by as much as 30% (based on the measurements done on all Dev4Press owned websites, tested over two weeks period), depending on the website size, use of multisite and other factors. - If you decide to use
ReadingUsage Monitor, make sure you don’t have it active too long. This method can get all relevant results faster, and it will be enough to have it active for 3-4 days only, with normal website activity, it should pick up all the relevant and used options and metadata in that period.