83% payssion-international-payment-gateway

Code Review | Payssion Plugin for Woocommerce

WordPress plugin Payssion Plugin for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: payssion-internat...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Oct 8, 2023
  • Number of updates: 56
  • Update frequency: every 44.2 days
  • Top authors: payssion (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

400+ active /11,264 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.78ms] Passed 4 tests

Analyzing server-side resources used by Payssion Plugin for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.77 ▼0.42
Dashboard /wp-admin3.34 ▼0.0047.29 ▼9.73
Posts /wp-admin/edit.php3.40 ▲0.0446.80 ▲1.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.39 ▼4.74
Media Library /wp-admin/upload.php3.27 ▲0.0434.93 ▼0.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Payssion Plugin for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.17 ▼0.431.68 ▲0.1744.26 ▲5.88
Dashboard /wp-admin2,198 ▲205.59 ▼0.0285.18 ▼16.6342.43 ▼0.10
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.1336.25 ▼0.6234.28 ▲1.52
Add New Post /wp-admin/post-new.php1,525 ▼423.23 ▼0.51600.52 ▼67.1549.35 ▼0.39
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0593.00 ▼8.8043.47 ▼0.33

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payssion-international-payment-gateway/payssion.php:11

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 90% 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: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

payssion-international-payment-gateway/payssion.php 85% from 13 tests

The main PHP script in "Payssion Plugin for Woocommerce" version 1.2.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payssion-international-payment-gateway.php" instead of "payssion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin6,074 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23231613,903
PHP1135271,2062,171

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.96
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes112
▷ Abstract classes10.89%
▷ Concrete classes11199.11%
▷ Final classes00.00%
Methods79
▷ Static methods11.27%
▷ Public methods4759.49%
▷ Protected methods1620.25%
▷ Private methods1620.25%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
114 PNG files occupy 0.72MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/santander_br.png7.08KB2.69KB▼ 62.08%
assets/images/molpay.png5.40KB3.00KB▼ 44.44%
assets/images/pse_co.png2.07KB2.08KB0.00%
assets/images/bancomer_mx.png8.79KB2.89KB▼ 67.13%
assets/images/fpx_my.png5.60KB2.28KB▼ 59.24%