79% woo-westpac-payway-payment-gateway

Code Review | Westpac PayWay NET Payment Gateway for WooCommerce

WordPress plugin Westpac PayWay NET Payment Gateway for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: woo-westpac-paywa...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2019
  • Latest release: Jun 25, 2019
  • Number of updates: 6
  • Update frequency: every 48.7 days
  • Top authors: techdog1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /771 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.15ms] Passed 4 tests

A check of server-side resources used by Westpac PayWay NET Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.00 ▼5.34
Dashboard /wp-admin3.31 ▲0.0147.57 ▼2.84
Posts /wp-admin/edit.php3.36 ▲0.0150.42 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.98 ▼7.71
Media Library /wp-admin/upload.php3.23 ▲0.0135.80 ▼0.70

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Westpac PayWay NET Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.16 ▼1.241.58 ▼0.2450.19 ▲9.75
Dashboard /wp-admin2,224 ▲175.84 ▲0.95101.86 ▼8.4538.43 ▼3.80
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0042.02 ▲1.5735.64 ▲1.67
Add New Post /wp-admin/post-new.php1,546 ▲123.17 ▼0.01658.74 ▼18.0657.46 ▲4.83
Media Library /wp-admin/upload.php1,400 ▼04.23 ▼0.1896.63 ▼12.6542.70 ▼4.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-westpac-payway-payment-gateway/uninstall.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-westpac-payway-payment-gateway/includes/payway-rest-admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: payment, woocommerce, gateway

woo-westpac-payway-payment-gateway/woo-westpac-payway-payment-gateway.php Passed 13 tests

The principal PHP file in "Westpac PayWay NET Payment Gateway for WooCommerce" v. 2.0 is loaded by WordPress automatically on each request
112 characters long description:
The plugin gives the functionality of processing Credit and Debit Cards on WooCommerce using Westpac PayWay NET.

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
There were no executable files found in this plugin219 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47646219

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin