84% otf-regenerate-thumbnails

Code Review | OTF Regenerate Thumbnails

WordPress plugin OTF Regenerate Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: otf-regenerate-th...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: Feb 28, 2015
  • Number of updates: 9
  • Update frequency: every 3.7 days
  • Top authors: bfintal (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

8,000+ active /138,473 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by OTF Regenerate Thumbnails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.03 ▲7.75
Dashboard /wp-admin3.33 ▼0.0247.07 ▼13.61
Posts /wp-admin/edit.php3.38 ▲0.0244.91 ▲4.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.85 ▼21.12
Media Library /wp-admin/upload.php3.25 ▲0.0232.15 ▼0.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

OTF Regenerate 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,825 ▲5413.15 ▼1.211.88 ▼0.6144.93 ▲1.83
Dashboard /wp-admin2,206 ▲185.85 ▲0.9799.78 ▼5.5937.92 ▼1.51
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0634.48 ▼6.1936.14 ▼0.84
Add New Post /wp-admin/post-new.php1,514 ▼1617.77 ▼0.63676.21 ▲57.0353.41 ▲0.58
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0195.04 ▼6.0943.04 ▲0.49

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 add_filter() in wp-content/plugins/otf-regenerate-thumbnails/otf_regen_thumbs.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: automatic, otf, resize, thumbnail, on the fly...

otf-regenerate-thumbnails/otf_regen_thumbs.php 92% from 13 tests

"OTF Regenerate Thumbnails" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("otf-regenerate-thumbnails.php" instead of "otf_regen_thumbs.php")

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
There were no executable files found in this plugin81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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