90% woo-hnb-bank-payment-gateway

Code Review | WooCommerce HNB bank payment Gateway

WordPress plugin WooCommerce HNB bank payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: woo-hnb-bank-paym...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 12, 2017
  • Latest release: Jun 12, 2017
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: redevoke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by WooCommerce HNB bank payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.96 ▼5.14
Dashboard /wp-admin3.31 ▲0.0045.64 ▼9.09
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▼0.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.93 ▼14.12
Media Library /wp-admin/upload.php3.23 ▲0.0035.67 ▲2.68

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce HNB bank payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.67 ▼0.701.80 ▲0.0444.09 ▼4.15
Dashboard /wp-admin2,206 ▲214.86 ▼0.04101.43 ▼1.7839.35 ▼2.39
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0440.96 ▼0.1333.95 ▼0.87
Add New Post /wp-admin/post-new.php1,533 ▲1923.19 ▲5.55620.25 ▼123.4057.21 ▲4.30
Media Library /wp-admin/upload.php1,388 ▲34.34 ▲0.1496.73 ▼0.5642.42 ▼1.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: woocommerce, hnb ipg, redevoke ipg, payment gateway, hnb payment gateway integration...

woo-hnb-bank-payment-gateway/re_hnb_payment_gateway.php 92% from 13 tests

"WooCommerce HNB bank payment Gateway" version 1.0'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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-hnb-bank-payment-gateway.php" instead of "re_hnb_payment_gateway.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 plugin131 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1338131

PHP code Passed 2 tests

An short overview of 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.14
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
hnb_bank_payment_gateway_logo_redevoke_solutions.png21.70KB5.59KB▼ 74.26%