84% delete-thumbnails

Code Review | Delete Thumbnails

WordPress plugin Delete Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: delete-thumbnails
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Nov 7, 2014
  • Latest release: Jul 7, 2017
  • Number of updates: 13
  • Update frequency: every 79.2 days
  • Top authors: davidsword (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

200+ active /7,066 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Delete Thumbnails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.78 ▲5.85
Dashboard /wp-admin3.32 ▲0.0149.38 ▼2.72
Posts /wp-admin/edit.php3.37 ▲0.0151.08 ▲3.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.33 ▼9.93
Media Library /wp-admin/upload.php3.24 ▲0.0133.79 ▼4.77
Delete Thumbnails /wp-admin/tools.php?page=dlthumbs3.2133.36

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Delete Thumbnails: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.102.03 ▲0.3842.37 ▼1.00
Dashboard /wp-admin2,202 ▲225.61 ▼0.0490.16 ▲2.5838.78 ▼5.91
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0038.74 ▲4.0635.79 ▲2.45
Add New Post /wp-admin/post-new.php1,529 ▲323.04 ▼0.17668.79 ▲45.4659.48 ▲11.90
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.11101.39 ▼2.6348.80 ▼0.91
Delete Thumbnails /wp-admin/tools.php?page=dlthumbs8472.0330.5057.36

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/delete-thumbnails/delete-thumbnails.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

delete-thumbnails/delete-thumbnails.php 92% from 13 tests

The main PHP file in "Delete Thumbnails" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected346 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24095232
CSS101478
JavaScript17636

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected