84% uddoktapay-gateway

Code Review | UddoktaPay Gateway

WordPress plugin UddoktaPay Gateway scored84%from 54 tests.

About plugin

  • Plugin page: uddoktapay-gateway
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Nov 20, 2023
  • Number of updates: 17
  • Update frequency: every 31.5 days
  • Top authors: uddoktapay (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by UddoktaPay Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.03 ▼7.38
Dashboard /wp-admin3.32 ▲0.0145.41 ▼2.55
Posts /wp-admin/edit.php3.37 ▲0.0147.18 ▼5.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.34 ▲4.36
Media Library /wp-admin/upload.php3.25 ▲0.0135.38 ▲1.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for UddoktaPay Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4814.23 ▼0.051.73 ▲0.0338.32 ▼1.22
Dashboard /wp-admin2,218 ▲385.60 ▼0.0394.46 ▲5.0343.53 ▲3.31
Posts /wp-admin/edit.php2,123 ▲201.98 ▲0.0342.78 ▲1.4737.11 ▲0.66
Add New Post /wp-admin/post-new.php1,541 ▲1523.68 ▲0.47685.28 ▼23.9857.04 ▼1.81
Media Library /wp-admin/upload.php1,423 ▲234.17 ▲0.0098.41 ▼4.7644.08 ▲0.95

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/uddoktapay-gateway/class-wc-gateway-uddoktapay-gateway.php
    • > /wp-content/plugins/uddoktapay-gateway/class-wc-gateway-uddoktapay-gateway-international.php
    • > /wp-content/plugins/uddoktapay-gateway/includes/class-uddoktapay-api-handler.php
    • > /wp-content/plugins/uddoktapay-gateway/assets/index.php
    • > /wp-content/plugins/uddoktapay-gateway/uddoktapay-gateway.php
    • > /wp-content/plugins/uddoktapay-gateway/includes/index.php
    • > /wp-content/plugins/uddoktapay-gateway/assets/images/index.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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

uddoktapay-gateway/uddoktapay-gateway.php Passed 13 tests

The primary PHP file in "UddoktaPay Gateway" version 2.2.2 is used by WordPress to initiate all plugin functionality
87 characters long description:
This plugin allows your customers to pay with Bkash, Rocket, Nagad, Upay via UddoktaPay

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
Everything looks great! No dangerous files found in this plugin819 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5144229819

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.67
▷ Minimum class complexity25.00
▷ Maximum class complexity39.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods829.63%
▷ Public methods2488.89%
▷ Protected methods27.41%
▷ Private methods13.70%
Functions5
▷ Named functions5100.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
6 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bkash.png9.35KB4.22KB▼ 54.92%
assets/images/upay.png39.24KB20.03KB▼ 48.96%
assets/images/cellfin.png38.41KB15.10KB▼ 60.70%
assets/images/rocket.png17.58KB7.21KB▼ 58.99%
assets/images/nagad.png10.80KB5.07KB▼ 53.12%