83% manual-payment-gateway-bkash

Code Review | Bkash Manual Payment Gateway

WordPress plugin Bkash Manual Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: manual-payment-ga...
  • Plugin version: 1.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2020
  • Latest release: Sep 7, 2023
  • Number of updates: 9
  • Update frequency: every 114.2 days
  • Top authors: zitengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,561 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Bkash Manual Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.75 ▼0.72
Dashboard /wp-admin3.31 ▼0.0446.74 ▼15.06
Posts /wp-admin/edit.php3.36 ▲0.0045.55 ▲1.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.75 ▼10.53
Media Library /wp-admin/upload.php3.23 ▲0.0031.10 ▼6.04

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Bkash Manual Payment Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.811.73 ▲0.0642.43 ▲0.90
Dashboard /wp-admin2,206 ▲175.89 ▲0.97109.34 ▼13.9942.62 ▼3.46
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0134.88 ▼0.2731.48 ▼0.39
Add New Post /wp-admin/post-new.php1,527 ▼923.17 ▼0.10640.55 ▼15.8458.97 ▲4.96
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.0495.02 ▼0.6944.19 ▲2.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/manual-payment-gateway-bkash/bkash.php
    • > /wp-content/plugins/manual-payment-gateway-bkash/trunk/bkash.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can take inspiration from this readme.txt

manual-payment-gateway-bkash/bkash.php 69% from 13 tests

The principal PHP file in "Bkash Manual Payment Gateway" v. 1.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("manual-payment-gateway-bkash.php" instead of "bkash.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 353 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected599 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3159123593
JavaScript1005
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.54MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png10.42KB4.92KB▼ 52.78%
assets/screenshot-2.PNG133.58KB51.03KB▼ 61.80%
assets/screenshot-3.PNG164.42KB60.56KB▼ 63.17%
assets/banner-772x250.png18.23KB17.91KB▼ 1.74%
trunk/images/bkash.png1.81KB1.60KB▼ 11.71%