94% all-bd-mobile-payments-gateway

Code Review | All BD Mobile Payments Gateway

WordPress plugin All BD Mobile Payments Gateway scored 94% from 54 tests.

About plugin

  • Plugin page: all-bd-mobile-pay...
  • Plugin version: 3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.4
  • WordPress version: 5.8.1
  • First release: May 11, 2015
  • Latest release: Apr 3, 2020
  • Number of updates: 6
  • Update frequency: every 298.2 days
  • Top authors: emran.net (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 15,332 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by All BD Mobile Payments Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.83 ▲5.68
Dashboard /wp-admin3.08 ▲0.0242.67 ▲2.07
Posts /wp-admin/edit.php3.13 ▲0.0246.65 ▲7.76
Add New Post /wp-admin/post-new.php5.43 ▼0.0087.57 ▼561.14
Media Library /wp-admin/upload.php3.02 ▲0.0231.00 ▼4.05

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for All BD Mobile Payments Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11316.26 ▲0.787.84 ▼1.7947.04 ▲0.90
Dashboard /wp-admin2,977 ▲415.87 ▼0.05128.71 ▼43.80109.63 ▼8.06
Posts /wp-admin/edit.php2,743 ▲42.70 ▲0.0065.87 ▲2.0195.52 ▲6.54
Add New Post /wp-admin/post-new.php1,503 ▼18018.49 ▼0.25361.18 ▼11.52113.41 ▲9.78
Media Library /wp-admin/upload.php1,811 ▲75.05 ▲0.00147.53 ▼1.13119.27 ▲1.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/all-bd-mobile-payments-gateway/index.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: bangladesh, payment, mobile, gateway, mobile banking

all-bd-mobile-payments-gateway/index.php 92% from 13 tests

"All BD Mobile Payments Gateway" version 3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("all-bd-mobile-payments-gateway.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,254 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP95225022,254

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity40.75
▷ Minimum class complexity39.00
▷ Maximum class complexity41.00
Average method complexity5.42
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods6488.89%
▷ Protected methods00.00%
▷ Private methods811.11%
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
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gateways/images/Rocket.png1.66KB1.28KB▼ 22.86%
gateways/images/Nagad.png1.90KB1.45KB▼ 23.81%
gateways/images/MYCash.png1.15KB1.11KB▼ 3.32%
gateways/images/UCash.png1.19KB0.44KB▼ 63.47%
gateways/images/SureCash.png2.05KB1.44KB▼ 29.52%