94% wc-checkout-product-quantity-change

Code Review | Woocommcerce checkout product quantity change

WordPress plugin Woocommcerce checkout product quantity change scored 94% from 54 tests.

About plugin

  • Plugin page: wc-checkout-produ...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 5.8.1
  • First release: Aug 16, 2018
  • Latest release: May 24, 2020
  • Number of updates: 4
  • Update frequency: every 163.5 days
  • Top authors: deepintowp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 355 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Woocommcerce checkout product quantity change
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.14 ▲12.38
Dashboard /wp-admin3.07 ▲0.0146.59 ▲1.32
Posts /wp-admin/edit.php3.12 ▲0.0145.30 ▼0.67
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.49 ▼570.12
Media Library /wp-admin/upload.php3.01 ▲0.0132.22 ▼0.25

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Woocommcerce checkout product quantity change
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.86 ▲0.299.76 ▲0.5543.20 ▼3.18
Dashboard /wp-admin2,970 ▲365.93 ▼0.14140.13 ▼8.23105.02 ▼1.82
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0065.78 ▼0.8685.73 ▼7.10
Add New Post /wp-admin/post-new.php1,872 ▲25719.20 ▼2.12424.79 ▲136.73108.49 ▲1.37
Media Library /wp-admin/upload.php1,810 ▲35.05 ▲0.02153.08 ▼9.54114.63 ▼0.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-checkout-product-quantity-change/wc-checkout-product-quantity-editor.php

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 Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce checkout quantity, woocommerce checkout quantity change, woocommerce

wc-checkout-product-quantity-change/wc-checkout-product-quantity-editor.php 85% from 13 tests

"Woocommcerce checkout product quantity change" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-checkout-product-quantity-change.php" instead of "wc-checkout-product-quantity-editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin163 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44459154
CSS1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin