10% wp-clean-up-optimizer

Code Review | WP Clean Up Optimizer: Optimize Database & WordPress

WordPress plugin WP Clean Up Optimizer: Optimize Database & WordPress scored10%from 54 tests.

About plugin

  • Plugin page: wp-clean-up-optim...
  • Plugin version: 4.0.28
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2014
  • Latest release: Nov 18, 2019
  • Number of updates: 231
  • Update frequency: every 8.3 days
  • Top authors: contact-banker (100%)

Code review

54 tests

User reviews

109 reviews

Install metrics

1,000+ active /875,869 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-clean-up-optimizer/wp-cleanup-optimizer.php+576
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.50MB] [CPU: ▼47.51ms] Passed 4 tests

This is a short check of server-side resources used by WP Clean Up Optimizer: Optimize Database & WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.976.03 ▼30.29
Dashboard /wp-admin2.51 ▼0.806.97 ▼39.29
Posts /wp-admin/edit.php2.51 ▼0.857.22 ▼40.51
Add New Post /wp-admin/post-new.php2.51 ▼3.387.80 ▼79.94
Media Library /wp-admin/upload.php2.51 ▼0.7213.01 ▼24.15
/wp-admin/admin.php?page=cpo_wizard_optimizer2.516.97
/wp-admin/admin.php?page=cpo_live_traffic2.517.10
Roles & Capabilities /wp-admin/admin.php?page=cpo_roles_and_capabilities2.518.40
Cron Jobs /wp-admin/admin.php?page=cpo_core_jobs2.516.39
/wp-admin/admin.php?page=cpo_ip_addresses2.517.02
/wp-admin/admin.php?page=cpo_add_new_database_schedule2.517.46
/wp-admin/admin.php?page=cpo_schedule_db_optimizer2.516.96
Other Settings /wp-admin/admin.php?page=cpo_other_settings2.516.88
/wp-admin/admin.php?page=cpo_block_unblock_countries2.518.39
/wp-admin/admin.php?page=cpo_message_settings2.516.94

Server storage [IO: ▲3.11MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 127 new files
Database: 3 new tables, 8 new options
New tables
wp_clean_up_optimizer
wp_clean_up_optimizer_ip_locations
wp_clean_up_optimizer_meta
New WordPress options
theysaidso_admin_options
can_compress_scripts
cpo_admin_notice
wp-cleanup-optimizer-version-number
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Clean Up Optimizer: Optimize Database & WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7013.23 ▼1.071.58 ▼0.1235.50 ▼6.04
Dashboard /wp-admin2,224 ▲364.93 ▼0.10100.23 ▼17.8775.39 ▲29.12
Posts /wp-admin/edit.php2,107 ▲151.96 ▼0.0436.73 ▼3.0733.16 ▼2.80
Add New Post /wp-admin/post-new.php1,680 ▲14720.18 ▼2.80660.43 ▲11.8066.68 ▲8.74
Media Library /wp-admin/upload.php1,400 ▲94.11 ▼0.1292.01 ▼10.3272.38 ▲26.68
/wp-admin/admin.php?page=cpo_wizard_optimizer1,0323.0461.8042.41
/wp-admin/admin.php?page=cpo_live_traffic1,0343.1859.6735.97
Roles & Capabilities /wp-admin/admin.php?page=cpo_roles_and_capabilities1,0343.0240.9736.05
Cron Jobs /wp-admin/admin.php?page=cpo_core_jobs1,0372.9840.2935.93
/wp-admin/admin.php?page=cpo_ip_addresses1,0313.0939.2735.72
/wp-admin/admin.php?page=cpo_add_new_database_schedule1,0313.0640.6335.55
/wp-admin/admin.php?page=cpo_schedule_db_optimizer1,0312.9638.5033.70
Other Settings /wp-admin/admin.php?page=cpo_other_settings1,0313.0740.8438.00
/wp-admin/admin.php?page=cpo_block_unblock_countries1,0313.0438.8135.36
/wp-admin/admin.php?page=cpo_message_settings1,0373.0241.2537.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-clean-up-optimizer/wp-cleanup-optimizer.php+576
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cpo_message_settings
    • > Deprecated in wp-content/plugins/wp-clean-up-optimizer/wp-cleanup-optimizer.php+891
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cpo_message_settings
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3&libraries=places&key=AIzaSyDOpCmwYFyneS7t5j8d6lNE1kRxL9vzsCI&ver=6.3.1 334:267 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

wp-clean-up-optimizer/wp-cleanup-optimizer.php 85% from 13 tests

"WP Clean Up Optimizer: Optimize Database & WordPress" version 4.0.28's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-clean-up-optimizer.php" instead of "wp-cleanup-optimizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin42,350 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PO File114,9945,95013,285
PHP3737991413,094
JavaScript82,1977,2198,160
CSS142311276,370
SVG2001,441

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.40
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions81
▷ Named functions81100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/global/img/error.png0.21KB0.21KB0.00%
assets/admin/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%
assets/global/img/logo.png12.30KB5.48KB▼ 55.48%
assets/global/plugins/datatables/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/global/img/portlet-collapse-icon.png0.26KB0.25KB▼ 5.20%