説明

Finds orphaned options and allows for their removal from the wp_options table.

スクリーンショット

The Orphaned Options list

The RSS Options list

Example Warning Message

The pre-delete Review table

インストール

If you are upgrading, deactivate the plugin and remove the cleanoptions.php file from the plugins directory before step 2

Upload the Clean Options folder to the ‘/wp-content/plugins/’ directory.

WordPress の「プラグイン」メニューからプラグインを有効化してください

Click the ‘Manage’/’Tools’ admin menu link, and select ‘CleanOptions’

FAQ

Installation Instructions

If you are upgrading, deactivate the plugin and remove the cleanoptions.php file from the plugins directory before step 2

Upload the Clean Options folder to the ‘/wp-content/plugins/’ directory.

WordPress の「プラグイン」メニューからプラグインを有効化してください

Click the ‘Manage’/’Tools’ admin menu link, and select ‘CleanOptions’

Does this plugin have any limitations?

The Clean Option plugin searches only PHP files in your blog’s folders for get_option(‘option_name’) and get_settings(‘option_name’). It does match slight variations such as get_option – space – ( – space – ” etc. but there may be instances where files use values in the wp_options table that do not match these patterns. 2 of these alternate forms of syntax are looked for and if found, the plugin will display a warning to help you indentify options that may not really be orphaned.
Nor does the plugin find unused options. It finds orphaned options, that is, options that do not have any files that “get” their values. Some options are known to have been created by files that are temporary, such as during upgrade and back-up.

This plugin finds ALL of the “rss_hash” options, even those that are current. Rather than tasking the server with a script that identifies current options, this plugin indentifies options that are likely to be current based on their timestamp.

Because of these limitations, the fact that unused options in the wp_options table have only a negligible effect upon performance, and the unknown effects of removing needed options, only options that are known to have been orphaned or deprecated should be removed.

Will this plugin work with PHP version 4 ?

Yes. I honestly don’t know why some hosts still offer PHP 4 as version 5 has been out for quite some time, but yes, this plugin works with PHP >= 4.2.0 and PHP 5. Because the Clean Options plugin uses native WordPress functions whenever possible, as long as WordPress works with PHP version 4 so will this plugin.

How can I help?

If you find any bugs with this plugin, please let me know. Many thanks to those that have reported problems with the plugin.

I have mixed feelings about the “Alternate Syntax” warnings. On the one hand, not having them may result with those less cautious accidentally deleting options that are not truly orphaned. On the other, having as much information about various situations available should be helpful in making wiser decisions about what options to delete. Alas, many plugins safely use “non-string” option names in their code, and in these cases the warning is not needed as there are no options associated with them listed. This introduces a proverbial “cry wolf” scenario that could be potentially annoying at best and distracting at worse. If you encounter such warnings (with a plugin from the WordPress plugin repository only, please), please leave a brief comment at the blog Alternate Syntax so I can analyze the plugin and add it to the “ignore” list if it is safe to do so. For those that would rather not see the Alternate Syntax Warnings every time, the show/hide feature can be used. The Alternate Syntax Warnings are not important when dealing with “rss_hash” options, but it is recommended that you show them before deleting any possibly orphaned plugin options.

How about about a select all?

The Clean Options plugin now has a javascript select/deselect all feature. Please note that the plugin author strongly believes that deleting rows from the wp_options table should be done thoughtfully and with care. However, for some blogs the table has become so bloated with excessive “rss_hash” rows, it is obviously more than just a matter of convenience. In fact, in extreme cases, the number of rows is such that the plugin taxes the memory limits of PHP while gathering the information to display them.

The plugin attempts to remedy this in several ways. A “Delete ALL ‘rss’ Options” has been added to the plugin (see Other Notes – RSS Options). There is also a limited “Find” (see Other Notes – RSS Options) that will find rss_hash options limited to batches of various numbers of pairs.

Ran this plugin today, and it still works perfectly. This has ALWAYS been one to use carefully, but it’s still doing it’s thing. Would love an update that supports multisite! Even as a premium/paid feature.