Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.57MB] [CPU: ▼2.07ms] Passed 4 tests
Analyzing server-side resources used by Media Hygiene: Remove or Delete Unused Images and More!
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.19 ▲0.72 | 38.66 ▼1.38 |
Dashboard /wp-admin | 3.91 ▲0.56 | 49.12 ▼12.63 |
Posts /wp-admin/edit.php | 3.96 ▲0.60 | 51.24 ▲2.32 |
Add New Post /wp-admin/post-new.php | 6.45 ▲0.56 | 94.80 ▲10.25 |
Media Library /wp-admin/upload.php | 3.77 ▲0.54 | 38.94 ▲3.42 |
Dashboard /wp-admin/admin.php?page=wmh-media-hygiene | 3.95 | 43.51 |
Settings /wp-admin/admin.php?page=wmh-settings | 3.83 | 38.51 |
Get Help /wp-admin/admin.php?page=wmh-get-help | 3.76 | 41.38 |
Server storage [IO: ▲3.67MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 86 new files
Database: 7 new tables, 7 new options
New tables |
---|
wp_wmh_used_media_post_id |
wp_wmh_temp |
wp_wmh_save_scan_content |
wp_wmh_whitelist_media_post_id |
wp_wmh_deleted_media |
wp_wmh_unused_media_post_id |
wp_wmh_error_log |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
wmh_send_data_to_server_permission |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Media Hygiene: Remove or Delete Unused Images and More!: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,942 ▲180 | 13.29 ▼1.41 | 1.72 ▲0.02 | 28.59 ▼14.43 |
Dashboard /wp-admin | 2,350 ▲170 | 5.07 ▼0.57 | 105.62 ▲6.29 | 43.81 ▲6.40 |
Posts /wp-admin/edit.php | 2,261 ▲161 | 2.41 ▲0.38 | 52.12 ▲13.36 | 37.77 ▼0.76 |
Add New Post /wp-admin/post-new.php | 1,648 ▲103 | 23.46 ▼1.51 | 622.76 ▼50.18 | 35.92 ▼29.31 |
Media Library /wp-admin/upload.php | 1,550 ▲156 | 4.74 ▲0.53 | 106.48 ▲8.02 | 45.70 ▲2.81 |
Dashboard /wp-admin/admin.php?page=wmh-media-hygiene | 2,221 | 8.68 | 104.51 | 96.44 |
Settings /wp-admin/admin.php?page=wmh-settings | 2,033 | 9.19 | 100.13 | 49.05 |
Get Help /wp-admin/admin.php?page=wmh-get-help | 1,682 | 12.83 | 326.34 | 60.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 19× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
- > /wp-content/plugins/media-hygiene/includes/wmh-settings.php
- > /wp-content/plugins/media-hygiene/templates/admin/wmh-media-hygiene-view.php
- > /wp-content/plugins/media-hygiene/class/admin/wmh-vc.php
- > /wp-content/plugins/media-hygiene/class/admin/wmh-elementor.php
- > /wp-content/plugins/media-hygiene/class/admin/wmh-divi.php
- > /wp-content/plugins/media-hygiene/templates/admin/wmh-settings-view.php
- > /wp-content/plugins/media-hygiene/templates/admin/wmh-dashboard-view.php
- > /wp-content/plugins/media-hygiene/media-hygiene.php
- > /wp-content/plugins/media-hygiene/class/admin/wmh-enfold.php
- > /wp-content/plugins/media-hygiene/class/admin/wmh-bricks.php
- 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
Use of undefined constant MH_FILE_PATH - assumed 'MH_FILE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/media-hygiene/templates/admin/wmh-deleted-media-view.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/media-hygiene/templates/admin/wmh-plugin-feedback-view.php:3
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/media-hygiene/templates/admin/wmh-button-view.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/media-hygiene/templates/admin/wmh-filter-view.php:31
- > PHP Fatal error
Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/media-hygiene/templates/admin/wmh-button-view.php:38
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/media-hygiene/templates/admin/wmh-new-media-info-view.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'wmh_general' not found in wp-content/plugins/media-hygiene/templates/admin/wmh-error-log-view.php:4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/media-hygiene/uninstall.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/media-hygiene/templates/admin/wmh-new-media-info-view.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/media-hygiene/templates/admin/wmh-header-view.php:4
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=wmh-get-help
- > Other (warning) in unknown
/wp-admin/admin.php?page=wmh-get-help 227 Unrecognized feature: 'web-share'.
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
- Tags: You are using too many tags: 13 tag instead of maximum 10
media-hygiene/media-hygiene.php Passed 13 tests
The primary PHP file in "Media Hygiene: Remove or Delete Unused Images and More!" version 2.0.0 is used by WordPress to initiate all plugin functionality
76 characters long description:
A plugin to remove unused media from WordPress and free up space on hosting.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6,780 lines of code in 45 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 30 | 716 | 531 | 4,962 |
JavaScript | 7 | 60 | 77 | 920 |
CSS | 7 | 182 | 42 | 897 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 36.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 252.00 |
Average method complexity | 6.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 103.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 17 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 115 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 115 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
media/woocommerce.png | 10.09KB | 3.62KB | ▼ 64.14% |
media/wpbackery.png | 16.23KB | 6.48KB | ▼ 60.05% |
media/divi.png | 10.95KB | 4.15KB | ▼ 62.09% |
media/wpml.png | 10.44KB | 3.77KB | ▼ 63.86% |
media/acf.png | 11.28KB | 3.72KB | ▼ 67.04% |