78% ebs-gateway-for-eshop

Code Review | EBS Gateway For eShop

WordPress plugin EBS Gateway For eShop scored78%from 54 tests.

About plugin

  • Plugin page: ebs-gateway-for-e...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2013
  • Latest release: May 11, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: lchrajkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,098 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by EBS Gateway For eShop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0048.83 ▲4.76
Dashboard /wp-admin3.31 ▲0.0148.49 ▼1.93
Posts /wp-admin/edit.php3.36 ▲0.0045.90 ▼4.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.43 ▼18.88
Media Library /wp-admin/upload.php3.23 ▲0.0034.66 ▼1.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by EBS Gateway For eShop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.514.23 ▲2.1639.22 ▼4.92
Dashboard /wp-admin2,206 ▲295.79 ▲0.8798.34 ▼13.6338.52 ▼4.44
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0536.31 ▼5.5429.80 ▼6.36
Add New Post /wp-admin/post-new.php1,542 ▲918.24 ▼4.76610.09 ▼24.8353.56 ▼6.98
Media Library /wp-admin/upload.php1,385 ▼34.27 ▲0.0797.89 ▼5.0440.51 ▼3.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

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 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Entry Field In eShop Admin Panel For EBS Merchant Details.), #2 (Checkout Form By Selecting EBS As Payment System.)
The official readme.txt might help

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

"EBS Gateway For eShop" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ebs-gateway-for-eshop.php" instead of "ebs-gateway-eshop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin316 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP336158316

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
ebs-payment.png32.53KB11.39KB▼ 64.98%