finds orphaned options and allows for their removal from the wp_options table
|Author:||Mittineague (profile at wordpress.org)|
|WordPress version required:||2.3|
|WordPress version tested:||2.9.2|
|Added to WordPress repository:||16-04-2007|
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|Total downloads:||145 402|
|Active installs:||6 000+|
Click to start download
Finds orphaned options and allows for their removal from the wp_options 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.
- Activate the plugin through the ‘Plugins’ menu in 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 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.
- updated the $known_ok array (for WordPress 3.0)
- de_DE German translation
- nl_NL Dutch translation
- allow 2.9.1 blogs to remove 2.8 transient options
- added timestamp to blog date/time format in review
- updated $known_ok array
- get_all_yes_autoload_options() optimization
- expanded string search to core files
- added ‘site’ to regex pattern
- added get_transient regex
- sr_RS Serbian Cyrillic translation
- sr_RS Serbian Latinica translation
- minor typo fixes
- updated older translation files
- updated the $known_ok array (for WordPress 2.9)
- optimized for WordPress 2.9
- replaced deprecated user_role
- pt_BR Portuguese translation
- zh_CN Chinese translation
- hr_HR Croatian translation
- removed WordPress < ver. 2.3 feature
- WordPress < ver. 2.7 fix
- be_BY Belarusian translation
- es_ES Spanish translation
- corrected ru_RU Russian translation
- uk_UA Ukrainian translation
- added more “transient”s
- allow 2.8+ blogs to remove all obsolete rss_hash rows
- allow for non-default folder locations/names
- improved unpaired rss block
- capability check for added security
- eliminate 2.8+ false warnings
- ru_RU Russian translation
- minor tweaks
- changed Version History to Changelog in readme
- updated the $known_ok array (for WordPress 2.8)
- changed admin CSS hook
- plugin page Settings link
- option count in admin menu
- minor tweaks
- $wpdb compatibility with WordPress < 2.5
- nonce compatibility with WordPress < 2.5
- minor tweak
- added show/hide Known Core
- added Search feature
- exclude non WP folders in searchdir()
- tweaked nonce calls
- changed fopen to is_readable
- changed fread to file_get_contents
- reduced # of dt in warnings
- searchdir tweak
- added support for MySQL < 4.1
- $rss_ts_arr sort tweak
- added option_name Google search links
- “delete all” Bug Fix
- added link to options.php page
- some regex refinement
- added “known Core” wording
- removed %s from yes in queries
- added category_children as known core
- added show/hide AS warnings
- added error message info
- added find non-string option names
- changed the way limit_query works
- optimized database queries
- refined ‘yes’ regex
- more minor tweaks yet again
- added show_errors to DB objects
- friendlier CSS selectors
- added label tags
- query syntax change
- query error catching added
- error scope changes
1.1.0 RC 27-Jan-2009
- limit ‘delete all’ rss delete to < 100 highest id
- added rss_hash limited find
- fixed and updated the $known_ok array
- improved robustness
- fixed searchdir() return type initialization
- set explicit return type in $wpdb->get_results queries
- ini_get(‘safe_mode’) fixes
- changed found rss_hash options section
- various other minor tweaks
1.0.0 RC 12-Nov-2008
- increased memory limit from 32M to 64M
- added remove all rss_hash section
Complete Version History available at the plugin’s page