89% minimum-and-maximum-product-quantity-for-woocommerce

Code Review | Minimum and Maximum Product Quantity for WooCommerce

WordPress plugin Minimum and Maximum Product Quantity for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: minimum-and-maxim...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2021
  • Latest release: Apr 25, 2023
  • Number of updates: 8
  • Update frequency: every 92.4 days
  • Top authors: sunarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.03ms] Passed 4 tests

This is a short check of server-side resources used by Minimum and Maximum Product Quantity for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.72 ▲2.14
Dashboard /wp-admin3.35 ▲0.0549.13 ▼5.96
Posts /wp-admin/edit.php3.40 ▲0.0546.26 ▼10.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0596.62 ▲9.13
Media Library /wp-admin/upload.php3.28 ▲0.0535.71 ▼5.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Minimum and Maximum Product Quantity for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.351.84 ▲0.0947.22 ▼1.53
Dashboard /wp-admin2,206 ▲184.86 ▼0.94117.36 ▲5.6347.55 ▼1.76
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0137.51 ▼7.8535.48 ▼3.74
Add New Post /wp-admin/post-new.php1,543 ▲1018.16 ▼4.99703.53 ▲6.5961.43 ▲0.31
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.09110.18 ▼5.2747.34 ▼1.78

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Requires php: Version not formatted correctly
The official readme.txt might help

minimum-and-maximum-product-quantity-for-woocommerce/minimum-and-maximum-product-quantity-for-woocommerce.php 85% from 13 tests

The main PHP script in "Minimum and Maximum Product Quantity for WooCommerce" version 1.0.5 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 264 characters long)

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
Everything looks great! No dangerous files found in this plugin217 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14518217

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin