83% change-quantity-on-checkout-for-woocommerce

Code Review | Change Quantity on Checkout for WooCommerce

WordPress plugin Change Quantity on Checkout for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: change-quantity-o...
  • Plugin version: 3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 27
  • Update frequency: every 98.5 days
  • Top authors: bhavik.kiri (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

6,000+ active /40,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Change Quantity on Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.94 ▼4.92
Dashboard /wp-admin3.31 ▼0.0445.68 ▼16.60
Posts /wp-admin/edit.php3.36 ▲0.0046.13 ▼3.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.15 ▼11.88
Media Library /wp-admin/upload.php3.23 ▲0.0036.56 ▲5.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
cqoc_addQuantityField
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Change Quantity on Checkout for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.21 ▲0.141.67 ▼0.1237.65 ▼6.59
Dashboard /wp-admin2,195 ▲185.62 ▲0.0191.31 ▼10.4941.62 ▼5.11
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0038.75 ▼1.2235.64 ▲1.76
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.65598.43 ▼62.4648.86 ▲1.44
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0297.56 ▼0.9541.80 ▲0.89

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • cqoc_addQuantityField
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/change-quantity-on-checkout-for-woocommerce/change-quantity-on-checkout-woocommerce.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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 your attention: The official readme.txt might help

change-quantity-on-checkout-for-woocommerce/change-quantity-on-checkout-woocommerce.php 77% from 13 tests

The main PHP file in "Change Quantity on Checkout for WooCommerce" ver. 3.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("1.4" instead of "3.0.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 210 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("change-quantity-on-checkout-for-woocommerce.php" instead of "change-quantity-on-checkout-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin258 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24240240
CSS11018

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.50
▷ Minimum class complexity7.00
▷ Maximum class complexity24.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1173.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cqoc-pro-setttings.png48.90KB21.63KB▼ 55.76%
screenshot-1.png21.32KB9.31KB▼ 56.36%