89% sampath-bank-ipg

Code Review | Sampath bank payment gateway

WordPress plugin Sampath bank payment gateway scored89%from 54 tests.

About plugin

  • Plugin page: sampath-bank-ipg
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Oct 22, 2014
  • Latest release: Feb 10, 2016
  • Number of updates: 33
  • Update frequency: every 32.8 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Sampath bank payment gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.18 ▼1.09
Dashboard /wp-admin3.31 ▲0.0047.30 ▼3.13
Posts /wp-admin/edit.php3.36 ▲0.0047.03 ▼0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.11 ▼7.47
Media Library /wp-admin/upload.php3.23 ▲0.0041.92 ▲0.22

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sampath bank payment gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.09 ▼0.261.76 ▼0.2243.56 ▼0.25
Dashboard /wp-admin2,195 ▲215.64 ▲0.0388.49 ▼12.5637.26 ▼4.35
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0435.26 ▼3.0134.36 ▼0.96
Add New Post /wp-admin/post-new.php1,526 ▼723.15 ▲0.09670.57 ▲7.4957.97 ▲6.75
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0497.60 ▼13.6444.33 ▼1.26

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
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI ("")
The official readme.txt might help

sampath-bank-ipg/sampath-payment-gateway-woocommerce.php 92% from 13 tests

The primary PHP file in "Sampath bank payment gateway" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sampath-bank-ipg.php" instead of "sampath-payment-gateway-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected372 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1818372

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected