74% media-cleaner

Code Review | Media Cleaner: Clean your WordPress!

WordPress plugin Media Cleaner: Clean your WordPress! scored74%from 54 tests.

About plugin

  • Plugin page: media-cleaner
  • Plugin version: 6.6.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: May 15, 2016
  • Latest release: Nov 18, 2023
  • Number of updates: 286
  • Update frequency: every 9.6 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

557 reviews

Install metrics

70,000+ active /2,471,116 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼1.49ms] Passed 4 tests

Server-side resources used by Media Cleaner: Clean your WordPress!
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.16 ▼12.15
Dashboard /wp-admin3.78 ▲0.4453.09 ▼6.70
Posts /wp-admin/edit.php3.83 ▲0.4859.64 ▲13.71
Add New Post /wp-admin/post-new.php6.31 ▲0.42101.66 ▲7.81
Media Library /wp-admin/upload.php3.64 ▲0.4137.12 ▲5.10
Media Cleaner /wp-admin/admin.php?page=wpmc_settings3.6135.20
Cleaner /wp-admin/upload.php?page=wpmc_dashboard3.6263.09
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.8250.96

Server storage [IO: ▲0.69MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: 2 new tables, 7 new options
New tables
wp_mclean_refs
wp_mclean_scan
New WordPress options
wpmc_options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Media Cleaner: Clean your WordPress!
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8514.48 ▲0.131.58 ▲0.0538.92 ▲0.20
Dashboard /wp-admin2,252 ▲755.58 ▼0.0791.88 ▼6.6042.21 ▼1.79
Posts /wp-admin/edit.php2,157 ▲571.95 ▼0.0240.49 ▲0.6136.79 ▲0.12
Add New Post /wp-admin/post-new.php1,573 ▲4722.83 ▼0.24597.06 ▼60.6054.97 ▼2.67
Media Library /wp-admin/upload.php1,460 ▲574.17 ▼0.0896.78 ▼1.7140.91 ▼1.12
Media Cleaner /wp-admin/admin.php?page=wpmc_settings1,1554.09108.4745.91
Cleaner /wp-admin/upload.php?page=wpmc_dashboard1,3115.73162.0842.35
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,6704.65107.9573.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 2 tables
    • wp_mclean_refs
    • wp_mclean_scan
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpmc_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/wpseo.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/metaslider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/maxmegamenu.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/media-cleaner/classes/init.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/attachments.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/media-cleaner/classes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/media-cleaner/media-cleaner.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/common.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/woocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-cleaner/classes/parsers/my-calendar.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

media-cleaner/media-cleaner.php Passed 13 tests

The entry point to "Media Cleaner: Clean your WordPress!" version 6.6.8 is a PHP file that has certain tags in its header comment area
96 characters long description:
Clean your WordPress! Eliminate unused and broken media files. For a faster, and better website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin4,449 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP225253493,694
PO File1177202725
JSON11025
JavaScript20245

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity44.43
▷ Minimum class complexity3.00
▷ Maximum class complexity269.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods177
▷ Static methods169.04%
▷ Public methods17598.87%
▷ Protected methods00.00%
▷ Private methods21.13%
Functions25
▷ Named functions1664.00%
▷ Anonymous functions936.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin