Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.10MB] [CPU: ▼5.45ms] Passed 4 tests
Analyzing server-side resources used by Upload Directory Cleaner
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.09 | 38.47 ▼2.44 |
Dashboard /wp-admin | 3.41 ▲0.10 | 44.81 ▼8.73 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 52.11 ▼2.97 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 94.49 ▼7.67 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 36.82 ▲0.90 |
Upload Directory Cleaner /wp-admin/tools.php?page=upload-directory-cleaner | 3.27 | 39.52 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
Please fix the following
- The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/upload-directory-cleaner/" and "wp-content/uploads/"
- (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options |
---|
udc_ignore |
widget_recent-posts |
udc_keep_thumbnails |
widget_recent-comments |
udc_delete_empty_directories |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Upload Directory Cleaner
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,844 ▲83 | 13.56 ▼0.81 | 1.80 ▲0.05 | 42.15 ▼0.37 |
Dashboard /wp-admin | 2,228 ▲25 | 4.86 ▼1.02 | 109.42 ▲4.26 | 41.51 ▲0.86 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.04 ▼0.02 | 39.55 ▲0.62 | 36.66 ▼1.46 |
Add New Post /wp-admin/post-new.php | 1,548 ▲17 | 23.03 ▲1.95 | 625.06 ▼51.67 | 54.39 ▼0.62 |
Media Library /wp-admin/upload.php | 1,407 ▲13 | 4.21 ▼0.01 | 97.34 ▼10.95 | 43.25 ▼2.19 |
Upload Directory Cleaner /wp-admin/tools.php?page=upload-directory-cleaner | 956 | 2.02 | 26.09 | 34.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 9 options
- udc_keep_thumbnails
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- udc_delete_empty_directories
- udc_ignore
- 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
- 6 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+177
Undefined index: is_array
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: action
- 4 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+188
Undefined offset: 1
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: excludes
- 2 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Warning in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+184
Invalid argument supplied for foreach()
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: preg_excludes
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: unregistered_log
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: deletes
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: udc_keep_thumbnails
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: udc_delete_empty_directories
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+179
Undefined index: udc_ignore
- 2 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=upload-directory-cleaner
- > Notice in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php+557
Undefined index: description
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/upload-directory-cleaner/upload-directory-cleaner.php:250
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: files, directory, clean, upload, images...
upload-directory-cleaner/upload-directory-cleaner.php Passed 13 tests
Analyzing the main PHP file in "Upload Directory Cleaner" version 0.2
105 characters long description:
The UDC plugin allows you to scan and delete all unregistered files from your Wordpress upload directory.
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 plugin597 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 101 | 57 | 568 |
CSS | 1 | 6 | 0 | 29 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 72.00 |
▷ Minimum class complexity | 72.00 |
▷ Maximum class complexity | 72.00 |
Average method complexity | 3.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 33 | |
▷ Static methods | 2 | 6.06% |
▷ Public methods | 7 | 21.21% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 26 | 78.79% |
Functions | 2 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 2 | 100.00% |
Constants | 6 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 6 | 100.00% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin