89% min-and-max-order-amount-for-woo-payment-gateways

Code Review | Minimum and Maximum Order Amount for WooCommerce Payment Gateways

WordPress plugin Minimum and Maximum Order Amount for WooCommerce Payment Gateways scored89%from 54 tests.

About plugin

  • Plugin page: min-and-max-order...
  • Plugin version: 1.0.2
  • PHP compatiblity: 4.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: Mar 4, 2023
  • Number of updates: 5
  • Update frequency: every 48.0 days
  • Top authors: wdraihan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Minimum and Maximum Order Amount for WooCommerce Payment Gateways
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.69 ▼0.40
Dashboard /wp-admin3.32 ▼0.0345.88 ▼12.48
Posts /wp-admin/edit.php3.37 ▲0.0147.42 ▼1.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.09 ▼11.40
Media Library /wp-admin/upload.php3.24 ▲0.0131.59 ▼1.37

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Minimum and Maximum Order Amount for WooCommerce Payment Gateways: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.58 ▼0.832.04 ▲0.3445.73 ▲4.10
Dashboard /wp-admin2,223 ▲355.03 ▲0.15108.67 ▲6.8240.63 ▼0.11
Posts /wp-admin/edit.php2,109 ▲201.99 ▼0.0140.43 ▲5.1837.71 ▼1.18
Add New Post /wp-admin/post-new.php1,545 ▲3123.06 ▲5.55596.02 ▼69.0451.78 ▼7.07
Media Library /wp-admin/upload.php1,402 ▲114.24 ▲0.0197.44 ▲0.9542.48 ▼3.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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 short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: min max order amount, minimum payment, maximum payment, stripe min max amount, min max payment...

min-and-max-order-amount-for-woo-payment-gateways/mmawpg.php 85% from 13 tests

The main PHP file in "Minimum and Maximum Order Amount for WooCommerce Payment Gateways" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("min-and-max-order-amount-for-woo-payment-gateways.php" instead of "mmawpg.php")

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
There were no executable files found in this plugin420 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44947389
JavaScript15331

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.33
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods533.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin