84% pay-io-payment-gateway

Code Review | Pay iO Payment Gateway

WordPress plugin Pay iO Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: pay-io-payment-ga...
  • Plugin version: 0.2.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Sep 25, 2021
  • Latest release: Mar 3, 2022
  • Number of updates: 48
  • Update frequency: every 3.3 days
  • Top authors: payio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /921 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.14ms] Passed 4 tests

Analyzing server-side resources used by Pay iO Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.75 ▲1.70
Dashboard /wp-admin3.35 ▲0.0148.71 ▼7.58
Posts /wp-admin/edit.php3.40 ▲0.0546.61 ▲1.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.27 ▼11.78
Media Library /wp-admin/upload.php3.27 ▲0.0434.44 ▲2.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pay iO Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.261.58 ▲0.1243.90 ▲2.87
Dashboard /wp-admin2,198 ▲185.57 ▼0.1095.82 ▼0.5141.00 ▼6.07
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0233.73 ▼0.1034.77 ▲0.49
Add New Post /wp-admin/post-new.php1,535 ▼118.26 ▼4.82639.54 ▼21.8085.40 ▲32.42
Media Library /wp-admin/upload.php1,394 ▼34.15 ▼0.0395.62 ▼2.2840.91 ▲0.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pay-io-payment-gateway/woocommerce-payio-gateway.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: cardless, payio, secure, payment gateway, pay io...

pay-io-payment-gateway/woocommerce-payio-gateway.php 92% from 13 tests

The primary PHP file in "Pay iO Payment Gateway" version 0.2.13 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pay-io-payment-gateway.php" instead of "woocommerce-payio-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin980 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8117242798
CSS2110157
JavaScript10024
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/payio-inline.png4.78KB3.31KB▼ 30.79%
assets/images/payio-support.png8.70KB4.23KB▼ 51.44%
assets/images/pay-with-bank-inline.png1.28KB1.22KB▼ 4.36%
assets/images/pay-now-inline.png1.15KB1.09KB▼ 5.25%
assets/images/payio-fast-checkout.png5.14KB2.50KB▼ 51.42%