84% bd-mobile-payments-gateway

Code Review | BD Mobile Payments Gateway

WordPress plugin BD Mobile Payments Gateway scored84%from 54 tests.

About plugin

  • Plugin page: bd-mobile-payment...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1.1
  • WordPress version: 6.3.1
  • First release: May 4, 2014
  • Latest release: Mar 10, 2015
  • Number of updates: 25
  • Update frequency: every 12.5 days
  • Top authors: onnoysomoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,214 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by BD Mobile Payments Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.36 ▲0.25
Dashboard /wp-admin3.32 ▼0.0249.03 ▼3.67
Posts /wp-admin/edit.php3.37 ▲0.0244.95 ▲1.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.44 ▼14.00
Media Library /wp-admin/upload.php3.24 ▲0.0235.11 ▲1.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BD Mobile Payments Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲6114.47 ▲0.092.15 ▲0.5644.33 ▲6.60
Dashboard /wp-admin2,210 ▲185.83 ▲0.95100.60 ▼22.0340.58 ▼5.15
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0535.92 ▲0.1437.19 ▲0.82
Add New Post /wp-admin/post-new.php1,540 ▲1223.13 ▲4.61693.89 ▲45.3956.09 ▲2.76
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.1298.95 ▲2.6642.06 ▲0.61

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bd-mobile-payments-gateway/bd-mobile-payments-woocommerce.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: woocommerce, payment gateway, mobile payments

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

"BD Mobile Payments Gateway" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bd-mobile-payments-gateway.php" instead of "bd-mobile-payments-woocommerce.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 detected596 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3136136596

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity40.00
▷ Minimum class complexity39.00
▷ Maximum class complexity41.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bKash.png3.69KB1.75KB▼ 52.55%
images/dbblmb.png2.75KB1.59KB▼ 41.98%