89% quantity-changer-on-checkout-for-wc

Code Review | Quantity Changer On CheckOut For WooCommerce

WordPress plugin Quantity Changer On CheckOut For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: quantity-changer-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Dec 6, 2019
  • Number of updates: 4
  • Update frequency: every 29.0 days
  • Top authors: kshirod patel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /490 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Quantity Changer On CheckOut For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.77 ▲3.58
Dashboard /wp-admin3.31 ▲0.0044.75 ▼0.69
Posts /wp-admin/edit.php3.36 ▲0.0048.81 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.85 ▲2.67
Media Library /wp-admin/upload.php3.23 ▲0.0033.55 ▼1.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quantity Changer On CheckOut For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.32 ▼1.231.53 ▼0.3638.64 ▼1.96
Dashboard /wp-admin2,206 ▲185.77 ▲0.7697.42 ▼7.4440.99 ▼1.87
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0239.29 ▲0.9535.64 ▲2.15
Add New Post /wp-admin/post-new.php1,533 ▲1923.11 ▲5.57645.64 ▼35.0547.21 ▼8.80
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0296.98 ▼9.1441.51 ▼3.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

quantity-changer-on-checkout-for-wc/quantity-changer-on-checkout-for-wc.php 85% from 13 tests

Analyzing the main PHP file in "Quantity Changer On CheckOut For WooCommerce" version 1.0
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin120 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33883104
JavaScript10016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin