77% woo-min-max-quantity-step-control-single

Code Review | Min Max Control - Min Max Quantity & Step Control for WooCommerce

WordPress plugin Min Max Control - Min Max Quantity & Step Control for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: woo-min-max-quant...
  • Plugin version: 5.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2019
  • Latest release: Nov 14, 2023
  • Number of updates: 137
  • Update frequency: every 12.9 days
  • Top authors: codersaiful (80.29%)codeastrology (9.49%)unikforce (6.57%)rafiul17 (5.84%)

Code review

54 tests

User reviews

61 reviews

Install metrics

10,000+ active /225,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.40ms] Passed 4 tests

Analyzing server-side resources used by Min Max Control - Min Max Quantity & Step Control for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1235.57 ▼7.22
Dashboard /wp-admin3.43 ▲0.1247.80 ▼2.99
Posts /wp-admin/edit.php3.54 ▲0.1845.40 ▼0.09
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.66 ▼7.30
Media Library /wp-admin/upload.php3.35 ▲0.1236.88 ▲3.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 166 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
wcmmq_minmaxstep
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Min Max Control - Min Max Quantity & Step Control for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2714.17 ▼0.181.74 ▼0.1927.74 ▼16.52
Dashboard /wp-admin2,219 ▲425.62 ▲0.0488.34 ▼12.9947.81 ▲5.22
Posts /wp-admin/edit.php2,125 ▲222.12 ▼0.0039.61 ▲3.6842.55 ▲5.62
Add New Post /wp-admin/post-new.php1,550 ▲2423.15 ▼0.19642.72 ▼55.5555.79 ▼0.86
Media Library /wp-admin/upload.php1,427 ▲364.19 ▼0.0098.19 ▼1.4943.38 ▼0.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • wcmmq_minmaxstep
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-min-max-quantity-step-control-single/admin/page/addons-list.php
  • 35× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-min-max-quantity-step-control-single/includes/set_max_min_quantity.php:156
    • > PHP Warning
      include(wp-content/plugins/woo-min-max-quantity-step-control-single/framework/ca-framework/ca-framework/loader.php): failed to open stream: No such file or directory in wp-content/plugins/woo-min-max-quantity-step-control-single/framework/ca-framework/example.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_object_taxonomies() in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/page/main-page/supported-terms.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/page/topbar.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-min-max-quantity-step-control-single/modules/module-page.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'CA_Framework\\Form\\Inc\\Field_Base' not found in wp-content/plugins/woo-min-max-quantity-step-control-single/framework/ca-framework/form/fields/select.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/plugin_setting_link.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_MMQ\\Core\\Base' not found in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/admin-loader.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/set_menu_and_fac.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_MMQ\\Core\\Base' not found in wp-content/plugins/woo-min-max-quantity-step-control-single/admin/page-loader.php:7

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 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: Please take inspiration from this readme.txt

woo-min-max-quantity-step-control-single/wcmmq.php 77% from 13 tests

Analyzing the main PHP file in "Min Max Control - Min Max Quantity & Step Control for WooCommerce" version 5.7
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 331 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-min-max-quantity-step-control-single.php" instead of "wcmmq.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin24,639 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82,5107349,746
PHP561,3342,0625,874
CSS165011463,991
PO File211,3831,4673,934
HTML191480
JSON100478
SVG177089
Markdown18047

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.78
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces15
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods194
▷ Static methods3015.46%
▷ Public methods16786.08%
▷ Protected methods94.64%
▷ Private methods189.28%
Functions51
▷ Named functions4384.31%
▷ Anonymous functions815.69%
Constants21
▷ Global constants1885.71%
▷ Class constants314.29%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.39MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/brand/social/skype.png1.77KB1.72KB▼ 2.71%
assets/images/features/setting-bottom.png13.89KB8.70KB▼ 37.36%
assets/images/min-max.png1.48KB0.85KB▼ 42.64%
assets/images/products/wc-quantity-plus-minus-button.png3.01KB1.89KB▼ 36.97%
assets/images/brand/social/wpt.png3.33KB1.89KB▼ 43.31%