80% order-minimum-amount-for-woocommerce

Code Review | Order Minimum/Maximum Amount for WooCommerce

WordPress plugin Order Minimum/Maximum Amount for WooCommerce scored80%from 54 tests.

About plugin

  • Plugin page: order-minimum-amo...
  • Plugin version: 4.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 3, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 92
  • Update frequency: every 27.0 days
  • Top authors: algoritmika (58.7%)wpcodefactory (42.39%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active /193,919 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
Install script ran successfully

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

Server-side resources used by Order Minimum/Maximum Amount for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.69 ▼8.32
Dashboard /wp-admin3.31 ▲0.0047.81 ▼4.30
Posts /wp-admin/edit.php3.36 ▲0.0049.72 ▲1.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.29 ▼3.58
Media Library /wp-admin/upload.php3.23 ▲0.0035.40 ▲4.07

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Order Minimum/Maximum Amount for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.72 ▲0.371.54 ▼0.2238.46 ▼6.40
Dashboard /wp-admin2,198 ▲215.60 ▼0.0495.53 ▼4.5342.21 ▼2.47
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0838.60 ▼1.3636.26 ▼4.07
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▲0.07593.00 ▼70.3752.81 ▲1.19
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0794.30 ▼5.5241.04 ▼3.69

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Frontend example – Cart notice.) image missing
Please take inspiration from this readme.txt

order-minimum-amount-for-woocommerce/order-minimum-amount-for-woocommerce.php Passed 13 tests

The primary PHP file in "Order Minimum/Maximum Amount for WooCommerce" version 4.3.8 is used by WordPress to initiate all plugin functionality
108 characters long description:
Set required minimum and/or maximum order amounts (e.g. sum, quantity, weight, volume, etc.) in WooCommerce.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/order-minimum-amount-for-woocommerce/vendor/bin/phpcbf.bat
      • wp-content/plugins/order-minimum-amount-for-woocommerce/vendor/bin/phpcs.bat
6,255 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP375821,6984,865
PO File14055831,175
JSON300185
XML1121422
DOS Batch2008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity20.43
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes13.57%
Methods194
▷ Static methods199.79%
▷ Public methods19298.97%
▷ Protected methods00.00%
▷ Private methods21.03%
Functions12
▷ Named functions541.67%
▷ Anonymous functions758.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin