90% thumbnail-cleaner

Code Review | Thumbnail Cleaner

WordPress plugin Thumbnail Cleaner scored 90% from 54 tests.

About plugin

  • Plugin page: thumbnail-cleaner
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2015
  • Latest release: Mar 31, 2018
  • Number of updates: 11
  • Update frequency: every 92.7 days
  • Top authors: thaikolja (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

2,000+ active / 41,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.81ms] Passed 4 tests

This is a short check of server-side resources used by Thumbnail Cleaner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.27 ▼1.60
Dashboard /wp-admin3.31 ▲0.0144.63 ▼2.64
Posts /wp-admin/edit.php3.36 ▲0.0155.51 ▲7.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.89 ▼9.31
Media Library /wp-admin/upload.php3.23 ▲0.0134.47 ▼1.68
Thumbnail Cleaner /wp-admin/tools.php?page=thumbnail-cleaner3.2031.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Thumbnail Cleaner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.64 ▼0.671.62 ▼0.4438.48 ▼4.74
Dashboard /wp-admin2,216 ▲344.88 ▼1.00109.84 ▼4.6241.95 ▼1.91
Posts /wp-admin/edit.php2,102 ▲102.16 ▲0.1240.49 ▲0.2634.33 ▼5.41
Add New Post /wp-admin/post-new.php1,523 ▼2223.30 ▲5.18644.87 ▲10.5652.92 ▼15.38
Media Library /wp-admin/upload.php1,398 ▲104.23 ▼0.0295.67 ▼4.8443.98 ▲1.26
Thumbnail Cleaner /wp-admin/tools.php?page=thumbnail-cleaner1,0071.7626.9076.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (The main page from which you can control Thumbnail Cleaner.)
You can look at the official readme.txt

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

The main PHP file in "Thumbnail Cleaner" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
Cleans up your WordPress installation by deleting and regenerating all thumbnails to remove unused ones.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin778 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5103238678
CSS2151259
SVG110022
JavaScript131219

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity8.80
▷ Minimum method complexity3.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin