90% woo-minimum-order-amount

Code Review | Woo-commerce Minimum Price Amount

WordPress plugin Woo-commerce Minimum Price Amount scored90%from 54 tests.

About plugin

  • Plugin page: woo-minimum-order...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2017
  • Latest release: Sep 15, 2023
  • Number of updates: 5
  • Update frequency: every 445.8 days
  • Top authors: Robiulawal40 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 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.03MB] [CPU: ▼3.81ms] Passed 4 tests

Server-side resources used by Woo-commerce Minimum Price Amount
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.64 ▲0.36
Dashboard /wp-admin3.34 ▲0.0351.07 ▼3.60
Posts /wp-admin/edit.php3.46 ▲0.0946.06 ▼6.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.83 ▼4.99
Media Library /wp-admin/upload.php3.27 ▲0.0337.92 ▲0.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo-commerce Minimum Price Amount
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.012.04 ▲0.4843.59 ▼1.05
Dashboard /wp-admin2,195 ▲245.62 ▼0.0598.40 ▲6.3243.43 ▼3.68
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0635.10 ▼2.7033.44 ▼1.48
Add New Post /wp-admin/post-new.php1,531 ▲522.87 ▼0.42675.63 ▼9.3153.58 ▼3.09
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0199.65 ▼7.9242.26 ▼6.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: woocommerce, minimum amount, woo-commerce set minimum order price, minimum order price plugin, minimum price

woo-minimum-order-amount/index.php 92% from 13 tests

The main PHP file in "Woo-commerce Minimum Price Amount" ver. 0.2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-minimum-order-amount.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin145 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35986145

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods16
▷ Static methods318.75%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin