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

Code Review | GazChap's WooCommerce Purchase Order Payment Gateway

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

About plugin

  • Plugin page: gazchaps-woocomme...
  • Plugin version: 3.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: May 24, 2023
  • Number of updates: 26
  • Update frequency: every 73.8 days
  • Top authors: gazchap (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,969 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.86ms] 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 /3.46 ▲0.0040.78 ▲1.78
Dashboard /wp-admin3.31 ▲0.0046.34 ▼7.33
Posts /wp-admin/edit.php3.36 ▲0.0041.65 ▼3.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.23 ▼13.17
Media Library /wp-admin/upload.php3.23 ▲0.0030.79 ▼3.69

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

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 /2,789 ▲2814.35 ▼0.031.92 ▲0.1444.49 ▼0.26
Dashboard /wp-admin2,198 ▲215.62 ▲0.0981.87 ▼6.7136.71 ▼8.41
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0437.20 ▲1.9232.74 ▼3.87
Add New Post /wp-admin/post-new.php1,526 ▼222.97 ▼0.09626.47 ▼41.6266.15 ▲9.02
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.0396.76 ▲3.2738.89 ▼3.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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: offline, invoice, gateway, ecommerce, payment...

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 3.1 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 detected800 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP37939550
PO File2110150248
CSS1001
JavaScript1001

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.62
Average class complexity47.33
▷ Minimum class complexity16.00
▷ Maximum class complexity92.00
Average method complexity6.82
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants4
▷ Global constants4100.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