77% payza-merchant-gateway-for-eshop

Code Review | PAYZA Merchant Gateway For eShop

WordPress plugin PAYZA Merchant Gateway For eShop scored77%from 54 tests.

About plugin

  • Plugin page: payza-merchant-ga...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 25, 2014
  • Latest release: Sep 16, 2014
  • Number of updates: 40
  • Update frequency: every 5.9 days
  • Top authors: lchrajkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.19ms] Passed 4 tests

Analyzing server-side resources used by PAYZA Merchant Gateway For eShop
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.28 ▼1.86
Dashboard /wp-admin3.31 ▲0.0049.70 ▼2.87
Posts /wp-admin/edit.php3.36 ▲0.0047.89 ▼5.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.85 ▼6.27
Media Library /wp-admin/upload.php3.23 ▲0.0037.05 ▼2.22

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PAYZA Merchant Gateway For eShop
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.451.85 ▼0.0542.64 ▼8.13
Dashboard /wp-admin2,192 ▲125.48 ▼0.1688.95 ▼8.3540.00 ▼2.38
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0234.65 ▼0.5036.37 ▲3.09
Add New Post /wp-admin/post-new.php1,529 ▲123.45 ▲0.24612.10 ▼56.1358.44 ▲3.62
Media Library /wp-admin/upload.php1,397 ▼64.17 ▼0.0296.90 ▼4.9143.82 ▼1.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/payza-merchant-gateway-for-eshop/payza-class.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/payza-merchant-gateway-for-eshop/payza-mg-gateway.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/payza-merchant-gateway-for-eshop/ipn.php:11
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/payza-merchant-gateway-for-eshop/ipn.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Successful plugin Installation & Activation.), #2 (Merchant details entry fields.), #3 (Merchant details entry fields filled.), #4 (eShop store Checkout Page.), #5 (Checkout Page in Payza Gateway.), #6 (Payment confirmation page.), #7 (Payment Success redirection notification page.), #8 (Payment Success Page.)
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

payza-merchant-gateway-for-eshop/payza-mg-gateway.php 85% from 13 tests

"PAYZA Merchant Gateway For eShop" version 0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("payza-merchant-gateway-for-eshop.php" instead of "payza-mg-gateway.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 202 characters long)

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
Success! There were no dangerous files found in this plugin335 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP448153335

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
payza.png5.81KB3.37KB▼ 42.11%