84% set-minimum-order-amount-for-woocommerce

Code Review | Set Minimum Order Amount for Woocommerce

WordPress plugin Set Minimum Order Amount for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: set-minimum-order...
  • Plugin version: 2020.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Apr 28, 2020
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: willemso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,370 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Set Minimum Order Amount for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.59 ▲2.43
Dashboard /wp-admin3.31 ▼0.0347.12 ▼9.12
Posts /wp-admin/edit.php3.37 ▲0.0146.25 ▼1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.79 ▼17.67
Media Library /wp-admin/upload.php3.24 ▲0.0132.62 ▲0.06

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Set Minimum Order Amount for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.40 ▲0.051.69 ▲0.1443.34 ▲3.54
Dashboard /wp-admin2,195 ▲155.63 ▼0.0089.04 ▲5.2840.36 ▼4.78
Posts /wp-admin/edit.php2,097 ▼02.00 ▼0.0234.06 ▼5.4235.99 ▲0.74
Add New Post /wp-admin/post-new.php1,535 ▲618.22 ▼4.50621.46 ▲41.7377.78 ▲30.01
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.04101.76 ▲6.1942.88 ▼0.86

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

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

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/set-minimum-order-amount-for-woocommerce/includes/admin.php
    • > /wp-content/plugins/set-minimum-order-amount-for-woocommerce/smoafw.php
    • > /wp-content/plugins/set-minimum-order-amount-for-woocommerce/uninstall.php
    • > /wp-content/plugins/set-minimum-order-amount-for-woocommerce/includes/core.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

set-minimum-order-amount-for-woocommerce/smoafw.php 92% from 13 tests

This is the main PHP file of "Set Minimum Order Amount for Woocommerce" version 2020.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("set-minimum-order-amount-for-woocommerce.php" instead of "smoafw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected123 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4302969
PO File281854

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin