83% min-max-order-amount-for-wc

Code Review | Minimum/Maximum Order Amount for WooCommerce

WordPress plugin Minimum/Maximum Order Amount for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: min-max-order-amo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2022
  • Latest release: Nov 24, 2022
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: racmanuel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Minimum/Maximum Order Amount for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1042.52 ▲0.88
Dashboard /wp-admin3.38 ▲0.0848.90 ▼0.85
Posts /wp-admin/edit.php3.50 ▲0.1446.08 ▲2.71
Add New Post /wp-admin/post-new.php5.96 ▲0.0893.81 ▲5.92
Media Library /wp-admin/upload.php3.31 ▲0.0836.14 ▼0.63

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Minimum/Maximum Order Amount for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5514.81 ▲0.251.67 ▼0.3944.79 ▼3.28
Dashboard /wp-admin2,221 ▲304.86 ▼0.0097.23 ▼19.0936.62 ▼8.82
Posts /wp-admin/edit.php2,100 ▲111.98 ▼0.0337.31 ▲3.3837.06 ▲0.10
Add New Post /wp-admin/post-new.php1,535 ▲2123.49 ▲5.92656.12 ▼24.7260.72 ▲11.24
Media Library /wp-admin/upload.php1,403 ▲154.21 ▼0.0196.41 ▼5.7844.49 ▼0.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/min-max-order-amount-for-wc/public/partials/min-max-order-amount-for-wc-public-display.php
    • > /wp-content/plugins/min-max-order-amount-for-wc/admin/partials/min-max-order-amount-for-wc-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can take inspiration from this readme.txt

min-max-order-amount-for-wc/min-max-order-amount-for-wc.php 85% from 13 tests

"Minimum/Maximum Order Amount for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)
  • Git Repository: An alternative Git repository was detected

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin301 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12139640295
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin