84% resize-post-thumbnails

Code Review | Resize Post Thumbnails

WordPress plugin Resize Post Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: resize-post-thumb...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Mar 10, 2017
  • Number of updates: 11
  • Update frequency: every 4.5 days
  • Top authors: alexvorn2 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.11ms] Passed 4 tests

A check of server-side resources used by Resize Post Thumbnails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.16 ▼6.25
Dashboard /wp-admin3.49 ▲0.1956.29 ▲5.05
Posts /wp-admin/edit.php3.61 ▲0.2555.52 ▲2.97
Add New Post /wp-admin/post-new.php6.05 ▲0.1788.48 ▼14.22
Media Library /wp-admin/upload.php3.39 ▲0.1743.21 ▲10.33
Resize Post Thumbnails /wp-admin/plugins.php?page=resize_post_thumbnails3.3941.65

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Resize Post Thumbnails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22015.22 ▲0.481.84 ▲0.0540.84 ▼1.95
Dashboard /wp-admin2,347 ▲1626.43 ▲0.62127.86 ▲26.2839.09 ▼4.93
Posts /wp-admin/edit.php2,253 ▲1613.38 ▲1.3355.88 ▲15.4834.51 ▼4.56
Add New Post /wp-admin/post-new.php1,670 ▲13722.02 ▼1.07646.39 ▲24.9639.22 ▼5.29
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.0983.88 ▼26.6245.26 ▲3.30
Resize Post Thumbnails /wp-admin/plugins.php?page=resize_post_thumbnails1,1553.1749.7828.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/plugins.php?page=resize_post_thumbnails
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at Object.init (/wp-content/plugins/resize-post-thumbnails/includes/admin/js/admin-menu.js?ver=1.2:44:53)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/resize-post-thumbnails/includes/admin/js/admin-menu.js?ver=1.2:114:75)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/plugins.php?page=resize_post_thumbnails
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: thumbnails, image, resize, featured

resize-post-thumbnails/resize-post-thumbnails.php Passed 13 tests

The principal PHP file in "Resize Post Thumbnails" v. 1.2 is loaded by WordPress automatically on each request
107 characters long description:
This plugin will resize post thumbnails on the fly. (Go to: Dashboard -> Plugins -> Resize Post Thumbnails)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,469 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP113931181,159
CSS1480234
JavaScript1251476

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.56
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin