78% pisol-mmq

Code Review | Product Quantity, Minimum Maximum quantity & Minimum Order quantity WooCommerce

WordPress plugin Product Quantity, Minimum Maximum quantity & Minimum Order quantity WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: pisol-mmq
  • Plugin version: 2.1.30
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Apr 29, 2019
  • Latest release: Nov 29, 2023
  • Number of updates: 187
  • Update frequency: every 9.0 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /52,672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Product Quantity, Minimum Maximum quantity & Minimum Order quantity WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.69 ▼6.57
Dashboard /wp-admin3.32 ▼0.0346.47 ▼17.31
Posts /wp-admin/edit.php3.37 ▲0.0146.92 ▼1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.86 ▼5.42
Media Library /wp-admin/upload.php3.24 ▲0.0136.31 ▲0.12

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

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

Browser metrics Passed 4 tests

Product Quantity, Minimum Maximum quantity & Minimum Order quantity WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.34 ▼0.031.56 ▼0.1735.68 ▼8.62
Dashboard /wp-admin2,198 ▲205.56 ▼0.16104.68 ▼8.0245.75 ▲0.95
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0140.38 ▲1.3638.88 ▲2.13
Add New Post /wp-admin/post-new.php1,532 ▲623.21 ▼0.23597.50 ▼13.0756.13 ▲8.48
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.0196.91 ▼3.7441.63 ▼0.04

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pisol-mmq/includes/pisol.class.form.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pisol-mmq/public/class-pisol-mmq-cart.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pisol-mmq/admin/class-admin-ajax.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pisol-mmq/public/class-pisol-mmq-cart-amount.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pisol-mmq/public/class-pisol-mmq-message.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pisol-mmq/includes/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pisol-mmq/includes/includes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pisol-mmq/public/class-pisol-mmq-product.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #10, #11, #12, #13, #14, #4, #6, #7, #9 in pisol-mmq/assets to your readme.txt
  • Donate link: Invalid URI found ("piwebsolution.com")
Please take inspiration from this readme.txt

pisol-mmq/pisol-mmq.php 92% from 13 tests

The main PHP script in "Product Quantity, Minimum Maximum quantity & Minimum Order quantity WooCommerce" version 2.1.30 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected16,339 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS32,040319,405
SVG824674,513
PHP307145182,232
JavaScript43642173
XML10016

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.36
Average class complexity12.71
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods148
▷ Static methods2416.22%
▷ Public methods14396.62%
▷ Protected methods00.00%
▷ Private methods53.38%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.45MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/min-amount-category.png76.77KB25.01KB▼ 67.42%
public/img/free-delivery.png200.80KB107.97KB▼ 46.23%
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%
includes/background.png74.27KB26.29KB▼ 64.60%
admin/img/pi.png1.48KB1.11KB▼ 24.83%