77% ebs-merchant-gateway-for-eshop

Code Review | EBS Merchant Gateway For eShop

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

About plugin

  • Plugin page: ebs-merchant-gate...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 23, 2014
  • Latest release: Mar 15, 2015
  • Number of updates: 24
  • Update frequency: every 19.3 days
  • Top authors: lchrajkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,688 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: ▼3.14ms] Passed 4 tests

A check of server-side resources used by EBS Merchant Gateway For eShop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.16 ▲3.99
Dashboard /wp-admin3.31 ▲0.0050.42 ▼2.28
Posts /wp-admin/edit.php3.36 ▲0.0047.88 ▼5.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.98 ▼1.61
Media Library /wp-admin/upload.php3.23 ▲0.0034.30 ▼3.55

Server storage [IO: ▲0.76MB] [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: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EBS Merchant Gateway For eShop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▼0.402.43 ▲0.0945.66 ▲1.21
Dashboard /wp-admin2,198 ▲215.64 ▲0.1187.38 ▼7.5339.03 ▼2.90
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.1240.00 ▲4.3536.01 ▲1.41
Add New Post /wp-admin/post-new.php1,541 ▼418.62 ▼4.59616.84 ▼71.4954.35 ▼15.58
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.0497.68 ▼12.8441.54 ▼3.97

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ebs-merchant-gateway-for-eshop/ebs-class.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ebs-merchant-gateway-for-eshop/ebs-mg-gateway.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ebs-merchant-gateway-for-eshop/ipn.php:8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/ebs-merchant-gateway-for-eshop/ipn.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
  • Screenshots: Add images for these screenshots: #1 (EBS Merchant Gateway Settings "LIVE" Mode.), #2 (EBS Merchant Gateway Settings "TEST" Mode.), #3 (eShop Checkout Page.), #4 (Transaction successful page for payment through EBS Gateway.), #5 (Invalid Account ID Error in EBS Gateway.)
You can take inspiration from this readme.txt

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

The main PHP script in "EBS Merchant Gateway For eShop" version 0.1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ebs-merchant-gateway-for-eshop.php" instead of "ebs-mg-gateway.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin534 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6127353395
JavaScript2426139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
ebs.png7.29KB3.02KB▼ 58.65%