94% minimum-order-amount-for-checkout

Code Review | Minimum Order Amount for Checkout

WordPress plugin Minimum Order Amount for Checkout scored 94% from 54 tests.

About plugin

  • Plugin page: minimum-order-amo...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.8.1
  • First release: May 7, 2020
  • Latest release: Mar 26, 2021
  • Number of updates: 16
  • Update frequency: every 20.2 days
  • Top authors: sbstocker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 1,233 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼157.72ms] Passed 4 tests

Server-side resources used by Minimum Order Amount for Checkout
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0934.97 ▲2.04
Dashboard /wp-admin3.14 ▲0.0844.26 ▼1.30
Posts /wp-admin/edit.php3.25 ▲0.1444.03 ▲3.05
Add New Post /wp-admin/post-new.php5.50 ▲0.0790.43 ▼625.14
Media Library /wp-admin/upload.php3.08 ▲0.0734.29 ▼6.49

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Minimum Order Amount for Checkout: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲22016.10 ▲0.0612.43 ▲3.4749.05 ▲0.43
Dashboard /wp-admin2,974 ▲405.92 ▼0.01138.09 ▼7.56104.13 ▲1.24
Posts /wp-admin/edit.php2,743 ▲42.73 ▲0.0062.57 ▼4.4985.62 ▲4.67
Add New Post /wp-admin/post-new.php1,687 ▲418.75 ▲0.29378.64 ▼120.20104.98 ▼16.55
Media Library /wp-admin/upload.php1,814 ▲75.03 ▲0.01163.48 ▼3.93112.79 ▼11.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/minimum-order-amount-for-checkout/public/partials/woo-min-order-amount-public-display.php
    • > /wp-content/plugins/minimum-order-amount-for-checkout/admin/partials/woo-min-order-amount-admin-display.php

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: minimum order, woocommerce, order total, order, woo...

minimum-order-amount-for-checkout/woo-min-order-amount.php 85% from 13 tests

The entry point to "Minimum Order Amount for Checkout" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("minimum-order-amount-for-checkout.php" instead of "woo-min-order-amount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin354 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12125563348
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods620.00%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin