89% product-quantity-for-woocommerce

Code Review | Min Max Default Quantity for WooCommerce

WordPress plugin Min Max Default Quantity for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-quantity-...
  • Plugin version: 4.5.19
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Oct 14, 2023
  • Number of updates: 154
  • Update frequency: every 14.1 days
  • Top authors: omardabbas (63.64%)algoritmika (27.92%)wpcodefactory (9.74%)

Code review

54 tests

User reviews

43 reviews

Install metrics

4,000+ active /184,635 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.00MB] [CPU: ▼9.77ms] Passed 4 tests

A check of server-side resources used by Min Max Default Quantity for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.31 ▼8.21
Dashboard /wp-admin3.31 ▲0.0147.22 ▼6.38
Posts /wp-admin/edit.php3.36 ▲0.0048.66 ▼0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.26 ▼21.46
Media Library /wp-admin/upload.php3.23 ▲0.0036.45 ▼3.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Min Max Default Quantity for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.301.97 ▲0.2346.57 ▲7.12
Dashboard /wp-admin2,198 ▲215.60 ▼0.0396.14 ▲0.4639.67 ▼3.00
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0439.62 ▲2.7334.08 ▼5.52
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.18680.04 ▼11.5652.53 ▼3.56
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.15101.13 ▼12.6347.22 ▲1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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)
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Plugin Main Page), #2 (Minimum Quantity Settings Page), #3 (Maximum Quantity Settings Page), #4 (Step Quantity Settings Page), #5 (Fixed Quantity Settings Page), #6 (Quantity Dropdown Settings Page), #7 (Price Display Settings Page), #8 (Quantity Info Control Settings Page), #9 (Advanced Settings Page)
Please take inspiration from this readme.txt

product-quantity-for-woocommerce/product-quantity-for-woocommerce.php Passed 13 tests

The primary PHP file in "Min Max Default Quantity for WooCommerce" version 4.5.19 is used by WordPress to initiate all plugin functionality
129 characters long description:
Manage product quantity in WooCommerce, beautifully. Define a minimum / maximum / step quantity and more on WooCommerce products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin13,135 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP299701,7967,417
JavaScript75934762,931
PO File37551,1602,267
CSS111319518
INI1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity54.19
▷ Minimum class complexity1.00
▷ Maximum class complexity943.00
Average method complexity8.29
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes13.85%
Methods184
▷ Static methods10.54%
▷ Public methods184100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/js/select2.png0.51KB0.99KB0.00%
includes/js/select2x2.png0.64KB0.77KB0.00%