90% regen-thumbs

Code Review | Regen. Thumbs

WordPress plugin Regen. Thumbs scored90%from 54 tests.

About plugin

  • Plugin page: regen-thumbs
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.0
  • WordPress version: 6.3.1
  • First release: Apr 25, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 5
  • Update frequency: every 45.2 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /11,182 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.02MB] [CPU: ▼9.50ms] Passed 4 tests

Analyzing server-side resources used by Regen. Thumbs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.01 ▼2.76
Dashboard /wp-admin3.33 ▲0.0250.06 ▼15.08
Posts /wp-admin/edit.php3.38 ▲0.0247.51 ▼3.72
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.93 ▼16.42
Media Library /wp-admin/upload.php3.25 ▲0.0238.24 ▼1.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Regen. Thumbs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.16 ▼1.222.03 ▲0.0245.86 ▲1.44
Dashboard /wp-admin2,203 ▲154.88 ▼0.0499.80 ▼17.7841.16 ▼1.26
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0335.35 ▼3.1733.33 ▼0.43
Add New Post /wp-admin/post-new.php1,535 ▲2123.15 ▲5.54684.32 ▲13.5954.41 ▼4.73
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.07104.16 ▼0.7247.45 ▲0.90

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in regen-thumbs/assets to your readme.txt
You can look at the official readme.txt

regen-thumbs/regen-thumbs.php Passed 13 tests

"Regen. Thumbs" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
88 characters long description:
Regenerate post thumbnails with a single click on the post edit screen (Classic Editor).

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
Everything looks great! No dangerous files found in this plugin130 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2321787
JavaScript23125
Markdown18018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin