84% hblpay-payment-gateway-for-woocommerce

Code Review | HBLPAY Payment Gateway for WooCommerce

WordPress plugin HBLPAY Payment Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: hblpay-payment-ga...
  • Plugin version: 2.0.2
  • PHP compatiblity: 8.1.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 36
  • Update frequency: every 17.4 days
  • Top authors: hblpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.31ms] Passed 4 tests

Server-side resources used by HBLPAY Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.23 ▼0.28
Dashboard /wp-admin3.31 ▼0.0442.71 ▼18.38
Posts /wp-admin/edit.php3.36 ▲0.0048.52 ▲1.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.04 ▼26.06
Media Library /wp-admin/upload.php3.23 ▲0.0035.78 ▼0.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for HBLPAY Payment Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.391.82 ▼0.3939.10 ▼4.49
Dashboard /wp-admin2,192 ▲155.60 ▼0.0598.31 ▲0.5144.51 ▼1.19
Posts /wp-admin/edit.php2,097 ▼01.94 ▼0.0539.99 ▼0.6135.77 ▲1.46
Add New Post /wp-admin/post-new.php1,526 ▼023.58 ▲0.44686.47 ▼3.2059.01 ▼1.15
Media Library /wp-admin/upload.php1,394 ▲34.31 ▲0.1599.33 ▼7.6241.44 ▼5.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hblpay-payment-gateway-for-woocommerce/hblpay-paymentgateway-woocommerce.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

hblpay-payment-gateway-for-woocommerce/hblpay-paymentgateway-woocommerce.php 92% from 13 tests

"HBLPAY Payment Gateway for WooCommerce" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hblpay-payment-gateway-for-woocommerce.php" instead of "hblpay-paymentgateway-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,242 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21861021,225
JavaScript111417

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity76.00
▷ Minimum class complexity76.00
▷ Maximum class complexity76.00
Average method complexity11.71
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin