83% manual-payment-gateway-nagad

Code Review | Nagad Manual Payment gateway

WordPress plugin Nagad Manual Payment gateway scored83%from 54 tests.

About plugin

  • Plugin page: manual-payment-ga...
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Nov 14, 2020
  • Latest release: Aug 19, 2021
  • Number of updates: 6
  • Update frequency: every 46.5 days
  • Top authors: zitengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,473 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.57ms] Passed 4 tests

Analyzing server-side resources used by Nagad Manual Payment gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.14 ▲1.65
Dashboard /wp-admin3.31 ▲0.0049.51 ▼3.77
Posts /wp-admin/edit.php3.36 ▲0.0049.49 ▼4.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.48 ▼13.47
Media Library /wp-admin/upload.php3.23 ▲0.0037.39 ▼1.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nagad Manual Payment gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▲0.021.81 ▼0.5244.58 ▼1.91
Dashboard /wp-admin2,198 ▲185.58 ▼0.0795.53 ▲8.1738.09 ▼3.67
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0439.79 ▲3.0533.92 ▼3.05
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▲0.09690.55 ▲36.1953.75 ▼1.64
Media Library /wp-admin/upload.php1,394 ▼94.20 ▼0.0295.35 ▼9.2142.12 ▼8.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/manual-payment-gateway-nagad/nagad.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

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

The entry point to "Nagad Manual Payment gateway" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 353 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("manual-payment-gateway-nagad.php" instead of "nagad.php")

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
No dangerous file extensions were detected302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28063297
JavaScript1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/nagad.png2.58KB2.16KB▼ 16.33%