99% woocommerce-thumbnail-input-quantities

Code Review | WooCommerce Thumbnail Input Quantities

WordPress plugin WooCommerce Thumbnail Input Quantities scored 99% from 53 tests.

About plugin

  • Plugin page: woocommerce-thumb...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-3.91
  • WordPress version: 5.8.1
  • First release: Nov 22, 2013
  • Latest release: May 13, 2014
  • Number of updates: 16
  • Update frequency: every 10.8 days
  • Top authors: jtwiest (100%)

Code review

53 tests

User reviews

1 review

Install metrics

1,000+ active / 18,352 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼256.18ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Thumbnail Input Quantities
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1247.39 ▲26.12
Dashboard /wp-admin3.06 ▲0.0184.52 ▲44.27
Posts /wp-admin/edit.php3.11 ▲0.0146.19 ▲3.48
Add New Post /wp-admin/post-new.php5.43 ▼0.0094.95 ▼1,040.65
Media Library /wp-admin/upload.php3.00 ▼0.0034.13 ▼13.65

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Thumbnail Input Quantities
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲20315.88 ▲0.4314.84 ▲7.1159.49 ▲13.85
Dashboard /wp-admin2,962 ▲1125.95 ▲0.15164.80 ▲32.06123.99 ▲20.97
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0280.54 ▲14.9793.58 ▼5.37
Add New Post /wp-admin/post-new.php1,851 ▲19517.48 ▲1.81366.22 ▼85.33114.09 ▼15.51
Media Library /wp-admin/upload.php1,772 ▼04.99 ▼0.03154.73 ▼34.76118.81 ▼14.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 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)
Good news, no errors were detected

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (screenshot-1.png)
The official readme.txt might help

woocommerce-thumbnail-input-quantities/woocommerce-thumbnail-input-quantity.php 85% from 13 tests

The entry point to "WooCommerce Thumbnail Input Quantities" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 193 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-thumbnail-input-quantities.php" instead of "woocommerce-thumbnail-input-quantity.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin121 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png75.86KB31.35KB▼ 58.67%