79% force-regenerate-thumbnails

Code Review | Force Regenerate Thumbnails

WordPress plugin Force Regenerate Thumbnails scored79%from 54 tests.

About plugin

  • Plugin page: force-regenerate-...
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2012
  • Latest release: Sep 13, 2023
  • Number of updates: 45
  • Update frequency: every 89.9 days
  • Top authors: Pedro Elsner (77.78%)nosilver4u (24.44%)

Code review

54 tests

User reviews

170 reviews

Install metrics

300,000+ active /3,741,743 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Force Regenerate Thumbnails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.66 ▲5.09
Dashboard /wp-admin3.32 ▲0.0147.67 ▼4.63
Posts /wp-admin/edit.php3.37 ▲0.0148.29 ▼4.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.54 ▼14.57
Media Library /wp-admin/upload.php3.24 ▲0.0134.15 ▼4.71
Force Regenerate Thumbnails /wp-admin/tools.php?page=force-regenerate-thumbnails3.2130.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 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 Force Regenerate Thumbnails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.72 ▲0.151.76 ▼1.3243.08 ▼0.29
Dashboard /wp-admin2,202 ▲255.57 ▼0.0991.82 ▼5.5141.51 ▼1.85
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0136.34 ▼0.6634.20 ▼3.85
Add New Post /wp-admin/post-new.php1,531 ▲522.89 ▼0.30674.82 ▲15.2459.42 ▼1.71
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.02100.41 ▼0.6243.01 ▼1.72
Force Regenerate Thumbnails /wp-admin/tools.php?page=force-regenerate-thumbnails8311.9135.0227.48

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
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 apply_filters() in wp-content/plugins/force-regenerate-thumbnails/force-regenerate-thumbnails.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=force-regenerate-thumbnails
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-progressbar&ver=6.3.1 1:28609 "jQuery.Deferred exception: regen_thumbs is not defined" "ReferenceError: regen_thumbs is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/force-regenerate-thumbnails/assets/regen.js?ver=213:3:18)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-progressbar&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-progressbar&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/tools.php?page=force-regenerate-thumbnails
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-progressbar&ver=6.3.1 1:28721 Uncaught ReferenceError: regen_thumbs is not defined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: regenerate thumbnails, thumbnail, force, thumbnails

force-regenerate-thumbnails/force-regenerate-thumbnails.php Passed 13 tests

This is the main PHP file of "Force Regenerate Thumbnails" version 2.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
Delete and REALLY force the regeneration of thumbnails.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,089 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2107256662
CSS1721301
JavaScript115782
XML15022
YAML18022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity154.00
▷ Minimum class complexity154.00
▷ Maximum class complexity154.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin