74% wp-thumbnail

Code Review | WP-Thumbnail

WordPress plugin WP-Thumbnail scored74%from 54 tests.

About plugin

  • Plugin page: wp-thumbnail
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.8.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 16, 2012
  • Latest release: Nov 4, 2012
  • Number of updates: 18
  • Update frequency: every 1.2 days
  • Top authors: Robocasters (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /15,009 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼40.05ms] Passed 4 tests

An overview of server-side resources used by WP-Thumbnail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0736.11 ▼10.05
Dashboard /wp-admin2.99 ▼0.3522.78 ▼50.47
Posts /wp-admin/edit.php3.00 ▼0.3627.54 ▼23.56
Add New Post /wp-admin/post-new.php3.00 ▼2.8927.52 ▼73.40
Media Library /wp-admin/upload.php3.00 ▼0.2322.19 ▼12.77

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Thumbnail
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.28 ▼1.104.81 ▲2.9943.84 ▼2.25
Dashboard /wp-admin2,221 ▲395.83 ▼0.07103.81 ▼1.5987.07 ▲44.56
Posts /wp-admin/edit.php2,107 ▲152.01 ▲0.0135.28 ▲0.1333.58 ▼2.12
Add New Post /wp-admin/post-new.php1,681 ▲15222.45 ▲4.23690.38 ▲40.0660.37 ▲1.75
Media Library /wp-admin/upload.php1,403 ▲154.26 ▲0.03107.03 ▲6.6049.83 ▲4.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-thumbnail/wp-thumbnail_admin.php+6
    Undefined variable: robo_dir
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-thumbnail/wp-thumbnail_admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The First slide shows the admin page for the plugin a link to which is added on the 'Installed Plugin'), #2 (The Second slide shows an example of the shortcode used on my blog to generate the dynamic screenshot), #3 (The Third slide shows the raw format of the previous post, in second slide. Simple and easy to understand)
Please take inspiration from this readme.txt

wp-thumbnail/wp-thumbnail.php 92% from 13 tests

The main PHP script in "WP-Thumbnail" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 503 characters long)

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
There were no executable files found in this plugin126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2149101
JavaScript10025

PHP code Passed 2 tests

A brief analysis 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.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
robo_icon.png3.78KB0.96KB▼ 74.57%