84% clean-unused-medias

Code Review | Clean Unused Medias

WordPress plugin Clean Unused Medias scored84%from 54 tests.

About plugin

  • Plugin page: clean-unused-medias
  • Plugin version: 1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-5.8
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Jul 20, 2021
  • Number of updates: 23
  • Update frequency: every 76.4 days
  • Top authors: xuxu.fr (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /7,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.31ms] Passed 4 tests

A check of server-side resources used by Clean Unused Medias
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.43 ▼0.94
Dashboard /wp-admin3.43 ▲0.1345.98 ▼5.37
Posts /wp-admin/edit.php3.54 ▲0.1946.50 ▼3.45
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.10 ▼15.48
Media Library /wp-admin/upload.php3.35 ▲0.1237.86 ▲1.17
Clean Unused Medias /wp-admin/upload.php?page=clean-unused-medias3.3230.26

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 16 new options
New WordPress options
lnjcm_medias_in_option_ids
lnjcm_medias_in_content_completed
lnjcm_medias_in_usermeta_ids
lnjcm_medias_in_content_pause
widget_theysaidso_widget
theysaidso_admin_options
lnjcm_medias_in_content_completed_date
can_compress_scripts
db_upgraded
lnjcm_medias_in_content_last_check
...

Browser metrics Passed 4 tests

Clean Unused Medias: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.201.71 ▼0.2145.27 ▲1.69
Dashboard /wp-admin2,210 ▲225.86 ▲0.7798.33 ▼22.5040.06 ▼7.76
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0534.52 ▼4.1733.19 ▼1.51
Add New Post /wp-admin/post-new.php1,536 ▲1723.15 ▼0.22683.47 ▼18.9065.78 ▲15.18
Media Library /wp-admin/upload.php1,434 ▲464.38 ▲0.18102.42 ▲2.1641.31 ▼2.92
Clean Unused Medias /wp-admin/upload.php?page=clean-unused-medias1,0382.2355.1641.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=clean-unused-medias
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/clean-unused-medias/ws/crawl.medias.php+103
    Division by zero

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: acf, advanced custom fields, attachment, clean, media

clean-unused-medias/clean-unused-medias.php Passed 13 tests

The primary PHP file in "Clean Unused Medias" version 1.10 is used by WordPress to initiate all plugin functionality
84 characters long description:
Clean Unused Medias : Simple way to delete medias not attached to any posts or pages

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
Everything looks great! No dangerous files found in this plugin1,842 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP91912851,243
JavaScript12359268
PO File17693224
CSS19099
Markdown1708

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin