78% wc-westpac-payway-with-recurring

Code Review | Payment gateway for Westpac PayWay NET on Woocommerce with Recurring Billing

WordPress plugin Payment gateway for Westpac PayWay NET on Woocommerce with Recurring Billing scored78%from 54 tests.

About plugin

  • Plugin page: wc-westpac-payway...
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: Oct 23, 2022
  • Number of updates: 14
  • Update frequency: every 37.4 days
  • Top authors: spanrig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.01ms] Passed 4 tests

This is a short check of server-side resources used by Payment gateway for Westpac PayWay NET on Woocommerce with Recurring Billing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.02 ▼6.47
Dashboard /wp-admin3.32 ▲0.0241.77 ▼11.51
Posts /wp-admin/edit.php3.38 ▲0.0249.36 ▼3.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.06 ▼14.68
Media Library /wp-admin/upload.php3.25 ▲0.0236.07 ▼1.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment gateway for Westpac PayWay NET on Woocommerce with Recurring Billing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.041.54 ▼0.1737.34 ▼8.44
Dashboard /wp-admin2,198 ▲245.61 ▼0.1294.47 ▼6.2542.37 ▲0.84
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0042.33 ▲6.1736.02 ▼0.24
Add New Post /wp-admin/post-new.php1,535 ▲918.38 ▼5.15607.11 ▼92.1567.10 ▲6.78
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.1198.23 ▼6.2843.60 ▼0.10

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wc-westpac-payway-with-recurring/uninstall.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-westpac-payway-with-recurring/includes/payway-rest-admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 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: gateway, payment, woocommerce

wc-westpac-payway-with-recurring/wc-westpac-payway-with-recurring.php 77% from 13 tests

The main PHP script in "Payment gateway for Westpac PayWay NET on Woocommerce with Recurring Billing" version 1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 76 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin374 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP49959374

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.30
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.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%
Functions5
▷ Named functions5100.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
No PNG images were found in this plugin