90% paystation-woocommerce-payment-gateway

Code Review | Paystation WooCommerce Payment Gateway

WordPress plugin Paystation WooCommerce Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: paystation-woocom...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Oct 31, 2022
  • Number of updates: 32
  • Update frequency: every 55.8 days
  • Top authors: paystationNZ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.01ms] Passed 4 tests

Server-side resources used by Paystation WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.93 ▼4.11
Dashboard /wp-admin3.37 ▲0.0650.40 ▼5.34
Posts /wp-admin/edit.php3.42 ▲0.0651.03 ▲0.57
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.96 ▼19.15
Media Library /wp-admin/upload.php3.29 ▲0.0644.21 ▲5.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Paystation WooCommerce Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.091.64 ▼0.0741.39 ▲0.50
Dashboard /wp-admin2,195 ▲175.67 ▼0.0098.99 ▼48.7341.43 ▼6.75
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0337.77 ▼5.9635.02 ▼0.79
Add New Post /wp-admin/post-new.php1,545 ▲623.25 ▲4.74656.97 ▼27.3552.44 ▲1.02
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.02104.93 ▲1.0843.90 ▲1.14

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

paystation-woocommerce-payment-gateway/paystation-woocommerce-payment-gateway.php Passed 13 tests

The entry point to "Paystation WooCommerce Payment Gateway" version 1.2.3 is a PHP file that has certain tags in its header comment area
64 characters long description:
Take credit card payments via Paystation's hosted payment pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin550 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15459298
SVG101252

PHP code Passed 2 tests

Analyzing 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.29
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin