93% bdt-2547-in-woocommerce

Code Review | BDT & Payment Gateways in WooCommerce

WordPress plugin BDT & Payment Gateways in WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: bdt-2547-in-wooco...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jul 21, 2013
  • Latest release: Aug 3, 2013
  • Number of updates: 26
  • Update frequency: every 0.5 days
  • Top authors: royaltechbd (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active / 3,560 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by BDT & Payment Gateways in WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0253.39 ▲1.17
Dashboard /wp-admin3.42 ▲0.0231.84 ▼10.86
Posts /wp-admin/edit.php3.65 ▲0.0159.14 ▲19.77
Add New Post /wp-admin/post-new.php6.89 ▼0.08105.56 ▼1,234.10
Media Library /wp-admin/upload.php3.30 ▲0.0128.63 ▲3.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BDT & Payment Gateways in WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,786 ▲3215.92 ▲0.286.35 ▼0.362.12 ▼0.44
Dashboard /wp-admin2,892 ▲316.08 ▼0.11121.68 ▼29.71160.83 ▼8.59
Posts /wp-admin/edit.php2,697 ▲273.26 ▲0.0163.67 ▼2.23150.98 ▲4.96
Add New Post /wp-admin/post-new.php1,706 ▼4520.55 ▼0.26476.79 ▲5.16171.96 ▲10.19
Media Library /wp-admin/upload.php1,709 ▲115.53 ▲0.04140.52 ▼2.09190.90 ▲4.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/bdt-2547-in-woocommerce/class-wc-bKash-gateway.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bdt-2547-in-woocommerce/bdt_in_woocommerce.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/bdt-2547-in-woocommerce/class-wc-dbblMB-gateway.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bdt-2547-in-woocommerce === )
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

bdt-2547-in-woocommerce/bdt_in_woocommerce.php 92% from 13 tests

This is the main PHP file of "BDT & Payment Gateways in WooCommerce" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bdt-2547-in-woocommerce.php" instead of "bdt_in_woocommerce.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
There were no executable files found in this plugin226 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP38057226

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.14
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.30KB8.87KB▼ 54.03%
images/dbblMB.png2.75KB1.59KB▼ 41.98%
screenshot-3.png67.16KB21.32KB▼ 68.25%
screenshot-5.png23.22KB8.52KB▼ 63.29%
images/bKash.png3.69KB1.75KB▼ 52.55%