89% payment-gateway-fornations-trust-bank-sri-lanka

Code Review | Payment gateway for nations trust bank sri lanka

WordPress plugin Payment gateway for nations trust bank sri lanka scored89%from 54 tests.

About plugin

  • Plugin page: payment-gateway-f...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Jan 19, 2017
  • Number of updates: 50
  • Update frequency: every 14.8 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /886 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Payment gateway for nations trust bank sri lanka
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.04 ▼2.00
Dashboard /wp-admin3.31 ▼0.0446.85 ▼18.35
Posts /wp-admin/edit.php3.36 ▲0.0043.59 ▼20.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.75 ▼21.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.75 ▼3.51

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
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 Payment gateway for nations trust bank sri lanka
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.181.73 ▼0.2736.06 ▼7.85
Dashboard /wp-admin2,206 ▲155.91 ▲1.03102.85 ▲2.4340.41 ▼2.81
Posts /wp-admin/edit.php2,089 ▲181.96 ▼0.0733.99 ▼17.6131.01 ▼11.50
Add New Post /wp-admin/post-new.php1,535 ▼723.14 ▲4.81672.70 ▲11.0566.14 ▲8.14
Media Library /wp-admin/upload.php1,382 ▼94.28 ▲0.0594.79 ▼19.3543.61 ▼7.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

payment-gateway-fornations-trust-bank-sri-lanka/payment-gateway-for-nations-trust-bank-sri-lanka.php 92% from 13 tests

The main PHP script in "Payment gateway for nations trust bank sri lanka" version 1.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payment-gateway-fornations-trust-bank-sri-lanka.php" instead of "payment-gateway-for-nations-trust-bank-sri-lanka.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
There were no executable files found in this plugin530 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113836530

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity82.00
▷ Minimum class complexity82.00
▷ Maximum class complexity82.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity51.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin