Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼1.57ms] Passed 4 tests
Analyzing server-side resources used by Nagad Payment Gateway
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 35.44 ▼1.98 |
Dashboard /wp-admin | 3.37 ▲0.07 | 44.52 ▼3.35 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 46.75 ▲0.12 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.07 | 91.96 ▼1.06 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 35.69 ▲0.55 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Nagad Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.65 ▼0.93 | 1.66 ▲0.04 | 40.92 ▼4.02 |
Dashboard /wp-admin | 2,203 ▲15 | 5.91 ▲0.03 | 103.17 ▼0.87 | 41.75 ▼2.14 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.02 ▼0.01 | 36.00 ▼4.66 | 36.21 ▼3.57 |
Add New Post /wp-admin/post-new.php | 1,537 ▲18 | 23.41 ▲0.21 | 677.24 ▲67.52 | 53.91 ▲3.01 |
Media Library /wp-admin/upload.php | 1,385 ▼0 | 4.19 ▲0.02 | 102.94 ▲0.92 | 46.02 ▲2.24 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nagad-payment-gateway/txn_list.php on line 6
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/nagad-payment-gateway/txn_list.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'Nagad\\Gateway\\Payment\\gateway' not found in wp-content/plugins/nagad-payment-gateway/helper.php:6
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/nagad-payment-gateway/txn_list.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nagad-payment-gateway/gateway.php:9
- > PHP Warning
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 90% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Contributors: Plugin contributors not specified
nagad-payment-gateway/index.php 85% from 13 tests
The principal PHP file in "Nagad Payment Gateway" v. 1.1.4 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("nagad-payment-gateway.php" instead of "index.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin956 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 310 | 271 | 936 |
JSON | 2 | 0 | 0 | 20 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 14.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 2.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 72 | |
▷ Static methods | 23 | 31.94% |
▷ Public methods | 68 | 94.44% |
▷ Protected methods | 1 | 1.39% |
▷ Private methods | 3 | 4.17% |
Functions | 4 | |
▷ Named functions | 2 | 50.00% |
▷ Anonymous functions | 2 | 50.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
3 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
logo/nagad_cover.png | 68.90KB | 68.91KB | 0.00% |
logo/nagad.png | 4.44KB | 2.74KB | ▼ 38.24% |
logo/ngd.png | 2.14KB | 1.23KB | ▼ 42.73% |