89% woo-quantity-buttons

Code Review | Quantity Buttons for WooCommerce

WordPress plugin Quantity Buttons for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-quantity-buttons
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2019
  • Latest release: Nov 19, 2023
  • Number of updates: 70
  • Update frequency: every 24.5 days
  • Top authors: rermis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /15,884 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼9.06ms] Passed 4 tests

A check of server-side resources used by Quantity Buttons for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.81 ▼4.74
Dashboard /wp-admin3.33 ▼0.0142.17 ▼18.20
Posts /wp-admin/edit.php3.38 ▲0.0344.63 ▲4.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.28 ▼10.03
Media Library /wp-admin/upload.php3.25 ▲0.0232.22 ▼3.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Quantity Buttons for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.69 ▲0.421.65 ▼0.0340.42 ▼3.40
Dashboard /wp-admin2,198 ▲185.62 ▼0.0389.02 ▼12.0936.90 ▼6.42
Posts /wp-admin/edit.php2,097 ▼62.02 ▲0.0639.49 ▼2.9335.92 ▼0.55
Add New Post /wp-admin/post-new.php1,526 ▼21123.14 ▼2.51615.87 ▼10.4252.58 ▼10.62
Media Library /wp-admin/upload.php1,403 ▼04.29 ▲0.10102.93 ▲2.3042.09 ▼1.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
5 plugin tags: buttons, quantity, plus, minus, woocommerce

woo-quantity-buttons/wqb_functions.php 85% from 13 tests

"Quantity Buttons for WooCommerce" version 1.1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-quantity-buttons.php" instead of "wqb_functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11518114

PHP code Passed 2 tests

Analyzing 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.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin