83% wc-minimum-price-required-to-checkout

Code Review | Minimum Price Required to Checkout for WooCommerce

WordPress plugin Minimum Price Required to Checkout for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-minimum-price-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.4
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Jun 11, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: wpacho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.07ms] Passed 4 tests

A check of server-side resources used by Minimum Price Required to Checkout for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.54 ▼2.35
Dashboard /wp-admin3.35 ▲0.0051.12 ▼32.79
Posts /wp-admin/edit.php3.40 ▲0.0454.57 ▲3.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.70 ▼6.89
Media Library /wp-admin/upload.php3.27 ▲0.0438.24 ▲1.77

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
wmpfc_fields
widget_recent-posts

Browser metrics Passed 4 tests

Minimum Price Required to Checkout for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.24 ▼0.121.58 ▼0.4943.00 ▼1.51
Dashboard /wp-admin2,196 ▲195.54 ▼0.0289.00 ▼3.5642.12 ▲1.66
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0140.20 ▼0.6038.28 ▲0.60
Add New Post /wp-admin/post-new.php1,530 ▲223.21 ▲0.14681.41 ▲57.7060.49 ▼7.23
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.0399.94 ▼0.5543.14 ▲0.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-minimum-price-required-to-checkout/wmpfc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: minimum price, woocommerce, woo minimum price

wc-minimum-price-required-to-checkout/wmpfc.php 77% from 13 tests

"Minimum Price Required to Checkout for WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-minimum-price-required-to-checkout.php" instead of "wmpfc.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected285 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP252148285

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 images were found in this plugin