79% hnb-payment-gateway

Code Review | HNB bank payment gateway

WordPress plugin HNB bank payment gateway scored79%from 54 tests.

About plugin

  • Plugin page: hnb-payment-gateway
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Nov 18, 2014
  • Latest release: Jan 19, 2017
  • Number of updates: 22
  • Update frequency: every 47.7 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,747 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.72ms] Passed 4 tests

Analyzing server-side resources used by HNB bank payment gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.05 ▼3.30
Dashboard /wp-admin3.38 ▲0.0356.33 ▼8.87
Posts /wp-admin/edit.php3.43 ▲0.0749.94 ▼4.55
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.95 ▼10.16
Media Library /wp-admin/upload.php3.30 ▲0.0740.55 ▲1.61

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_hnb_ipg
New WordPress options
db_upgraded
jal_db_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by HNB bank payment gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.43 ▼0.301.76 ▼0.1642.97 ▲2.74
Dashboard /wp-admin2,198 ▲215.59 ▼0.0086.50 ▼13.7441.27 ▲1.55
Posts /wp-admin/edit.php2,097 ▼62.00 ▼0.0134.59 ▼4.9636.64 ▼0.63
Add New Post /wp-admin/post-new.php1,526 ▼823.22 ▲5.10644.35 ▲11.2250.89 ▼28.97
Media Library /wp-admin/upload.php1,397 ▲34.22 ▲0.00103.12 ▲2.4343.44 ▼5.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_hnb_ipg
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • jal_db_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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)
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

hnb-payment-gateway/hnb-payment-gateway-woocommerce.php 92% from 13 tests

The principal PHP file in "HNB bank payment gateway" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hnb-payment-gateway.php" instead of "hnb-payment-gateway-woocommerce.php")

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
Everything looks great! No dangerous files found in this plugin341 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1818341

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ 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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin