72% onet-regenerate-thumbnails

Code Review | ONet Regenerate Thumbnails

WordPress plugin ONet Regenerate Thumbnails scored72%from 54 tests.

About plugin

  • Plugin page: onet-regenerate-t...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: May 15, 2016
  • Number of updates: 23
  • Update frequency: every 41.5 days
  • Top authors: orosznyet (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /48,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼11.25ms] Passed 4 tests

This is a short check of server-side resources used by ONet Regenerate Thumbnails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1640.99 ▼2.29
Dashboard /wp-admin3.51 ▲0.1669.91 ▼11.35
Posts /wp-admin/edit.php3.61 ▲0.2449.84 ▼6.83
Add New Post /wp-admin/post-new.php6.20 ▲0.3180.75 ▼24.51
Media Library /wp-admin/upload.php3.45 ▲0.2138.73 ▲4.12
Regen. Thumbnails /wp-admin/tools.php?page=onet-regen-thumbs3.3434.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

ONet 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,793 ▲3214.74 ▲0.211.95 ▲0.1242.11 ▼0.27
Dashboard /wp-admin2,199 ▲225.63 ▼0.0485.33 ▼4.8837.81 ▼1.99
Posts /wp-admin/edit.php2,119 ▲192.05 ▲0.0640.78 ▲5.0438.55 ▲3.15
Add New Post /wp-admin/post-new.php1,543 ▲823.44 ▲5.50695.13 ▲43.0952.45 ▼11.03
Media Library /wp-admin/upload.php1,420 ▲204.26 ▲0.0397.36 ▲0.0544.59 ▲0.95
Regen. Thumbnails /wp-admin/tools.php?page=onet-regen-thumbs1,0361.9228.9430.62

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=onet-regen-thumbs
    • > Warning in wp-content/plugins/onet-regenerate-thumbnails/onet-regen-thumbnails.php+863
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.support.php
    • > /wp-content/plugins/onet-regenerate-thumbnails/view/admin.metabox.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.customdim.php:1
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.support.php on line 5
    • > PHP Notice
      Trying to get property 'after_media_btn' of non-object in wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.settings.php on line 2
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.support.php on line 3
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/onet-regenerate-thumbnails/view/admin.metabox.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/onet-regenerate-thumbnails/onet-regen-thumbnails.php:36
    • > PHP Notice
      Undefined variable: onetrt_dashboard_vars in wp-content/plugins/onet-regenerate-thumbnails/view/main_ui.php on line 3
    • > PHP Notice
      Undefined variable: nonce in wp-content/plugins/onet-regenerate-thumbnails/view/main_ui.php on line 2
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/onet-regenerate-thumbnails/view/admin.metabox.php on line 3
    • > PHP Notice
      Undefined variable: opts in wp-content/plugins/onet-regenerate-thumbnails/view/admin.meta.settings.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: thumbnail, regenerate, advanced

onet-regenerate-thumbnails/onet-regen-thumbnails.php 77% from 13 tests

"ONet Regenerate Thumbnails" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 240 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("onet-regenerate-thumbnails.php" instead of "onet-regen-thumbnails.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
Success! There were no dangerous files found in this plugin3,335 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS436541,096
LESS211499816
PHP6161283686
PO File2180187476
JavaScript23951212
Markdown124049

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity107.00
▷ Minimum class complexity107.00
▷ Maximum class complexity107.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.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
16 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/jquery-ui/flick/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/screenshot-3.png112.84KB34.79KB▼ 69.17%
assets/js/jquery-ui/flick/images/ui-icons_666666_256x240.png6.82KB4.17KB▼ 38.82%
assets/js/jquery-ui/flick/images/ui-bg_flat_0_eeeeee_40x100.png0.21KB0.08KB▼ 60.45%
assets/js/jquery-ui/flick/images/ui-bg_flat_55_ffffff_40x100.png0.20KB0.08KB▼ 58.17%