89% set-minimum-order-for-woocommerce

Code Review | Set Minimum Checkout Amount for WooCommerce

WordPress plugin Set Minimum Checkout Amount for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: set-minimum-order...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Dec 31, 2020
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: machinedean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.98ms] Passed 4 tests

Analyzing server-side resources used by Set Minimum Checkout Amount for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0244.00 ▼1.02
Dashboard /wp-admin3.37 ▲0.0252.70 ▼4.26
Posts /wp-admin/edit.php3.42 ▲0.0253.30 ▲1.24
Add New Post /wp-admin/post-new.php5.95 ▲0.0294.38 ▼8.15
Media Library /wp-admin/upload.php3.29 ▲0.0237.60 ▼2.47

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Set Minimum Checkout Amount for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.091.78 ▼0.1243.83 ▲0.15
Dashboard /wp-admin2,195 ▲155.57 ▼0.0384.12 ▼5.0140.03 ▲0.03
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0335.35 ▼0.7231.63 ▼2.60
Add New Post /wp-admin/post-new.php1,526 ▼222.92 ▼0.08673.57 ▼4.6653.22 ▲1.14
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0396.87 ▼8.3544.96 ▲0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: cart total, woocommerce, basket total, ecommerce, minimum order

set-minimum-order-for-woocommerce/set-minimum-checkout-amount-for-woocommerce.php 77% from 13 tests

This is the main PHP file of "Set Minimum Checkout Amount for WooCommerce" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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: Name the main plugin file the same as the plugin slug ("set-minimum-order-for-woocommerce.php" instead of "set-minimum-checkout-amount-for-woocommerce.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.9.0")

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 detected121 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1282997
Markdown110024

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected