93% advance-bank-payment-transfer-gateway

Code Review | Advance Bank Payment Transfer Gateway

WordPress plugin Advance Bank Payment Transfer Gateway scored 93% from 54 tests.

About plugin

  • Plugin page: advance-bank-paym...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jun 19, 2020
  • Latest release: Sep 22, 2021
  • Number of updates: 12
  • Update frequency: every 39.5 days
  • Top authors: developerramesh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active / 2,193 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼291.45ms] Passed 4 tests

Analyzing server-side resources used by Advance Bank Payment Transfer Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.62 ▲1.65
Dashboard /wp-admin3.42 ▲0.0032.20 ▼0.48
Posts /wp-admin/edit.php3.65 ▲0.0035.62 ▼0.17
Add New Post /wp-admin/post-new.php6.89 ▼0.0990.88 ▼1,164.61
Media Library /wp-admin/upload.php3.30 ▲0.0024.16 ▼0.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advance Bank Payment Transfer Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲4016.14 ▲0.466.24 ▼0.022.17 ▼0.70
Dashboard /wp-admin2,888 ▲276.02 ▼0.13121.85 ▼17.39155.30 ▼5.39
Posts /wp-admin/edit.php2,694 ▲33.24 ▼0.0063.57 ▼1.18140.91 ▼5.37
Add New Post /wp-admin/post-new.php1,661 ▼2915.69 ▼5.31434.95 ▲1.85158.71 ▼0.41
Media Library /wp-admin/upload.php1,695 ▼65.46 ▼0.07138.08 ▼1.50188.66 ▲2.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advance-bank-payment-transfer-gateway/includes/hooks.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/advance-bank-payment-transfer-gateway/classes/wc_gateway_advance_bank_transfer.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Please take inspiration from this readme.txt

advance-bank-payment-transfer-gateway/wc-advanced-bank-transfer.php 92% from 13 tests

"Advance Bank Payment Transfer Gateway" version 1.0.4'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: It is recommended to name the main PHP file as the plugin slug ("advance-bank-payment-transfer-gateway.php" instead of "wc-advanced-bank-transfer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected459 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP39189418
Markdown113024
JavaScript11017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin