99% gazchaps-woocommerce-purchase-order-payment-gateway

Code Review | GazChap's WooCommerce Purchase Order Payment Gateway

WordPress plugin GazChap's WooCommerce Purchase Order Payment Gateway scored 99% from 54 tests.

About plugin

  • Plugin page: gazchaps-woocomme...
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.6
  • WordPress version: 5.8.1
  • First release: Feb 21, 2018
  • Latest release: May 4, 2021
  • Number of updates: 20
  • Update frequency: every 58.4 days
  • Top authors: gazchap (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 2,191 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by GazChap's WooCommerce Purchase Order Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.99 ▲11.79
Dashboard /wp-admin3.06 ▲0.0047.28 ▲0.85
Posts /wp-admin/edit.php3.11 ▲0.0041.20 ▼3.93
Add New Post /wp-admin/post-new.php5.42 ▼0.0288.80 ▼570.76
Media Library /wp-admin/upload.php3.00 ▲0.0033.35 ▲4.28

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GazChap's WooCommerce Purchase Order Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.27 ▲0.469.14 ▼0.2945.58 ▼3.92
Dashboard /wp-admin2,989 ▲555.93 ▼0.03138.18 ▼6.88116.49 ▲14.92
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0064.82 ▼2.4689.33 ▼3.13
Add New Post /wp-admin/post-new.php1,672 ▼1118.92 ▲0.08348.15 ▼24.2897.67 ▼13.05
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.01149.03 ▼3.51119.00 ▲7.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
7 plugin tags: ecommerce, offline, payment, gateway, purchase order...

gazchaps-woocommerce-purchase-order-payment-gateway/index.php 85% from 13 tests

The main PHP script in "GazChap's WooCommerce Purchase Order Payment Gateway" version 1.1.5 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.2.0" instead of "3.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("gazchaps-woocommerce-purchase-order-payment-gateway.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected365 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25729365

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity46.50
▷ Minimum class complexity4.00
▷ Maximum class complexity89.00
Average method complexity6.35
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin