Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼3.36ms] Passed 4 tests
Analyzing server-side resources used by Ksher
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.01 | 37.07 ▼0.98 |
Dashboard /wp-admin | 3.32 ▼0.03 | 45.89 ▼11.93 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 41.03 ▼1.20 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 79.63 ▲0.68 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 36.66 ▲4.85 |
Server storage [IO: ▲0.45MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Ksher
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲3 | 14.17 ▼0.35 | 1.64 ▼0.27 | 43.12 ▲3.59 |
Dashboard /wp-admin | 2,198 ▲17 | 5.62 ▼0.15 | 92.10 ▼4.84 | 42.71 ▲1.29 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.02 ▲0.03 | 34.76 ▲0.57 | 32.03 ▼7.63 |
Add New Post /wp-admin/post-new.php | 1,526 ▼153 | 23.13 ▲1.07 | 665.54 ▲45.46 | 49.55 ▲3.45 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.19 ▼0.01 | 98.05 ▼9.02 | 41.58 ▼4.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
Smoke tests 50% 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 0% 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
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/ksher-payment/includes/admin/views/ksher-page-settings.php
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ksher-payment/setting/check-payment.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ksher-payment/order-received/order-received.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_option() in wp-content/plugins/ksher-payment/setting/setting.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ksher-payment/payment/set-payment.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/ksher-payment/ksher.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 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
2 plugin tags: payments, woocommerce
ksher-payment/ksher.php 77% from 13 tests
The primary PHP file in "Ksher" version 1.0.12 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("ksher-payment.php" instead of "ksher.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
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
There were no executable files found in this plugin1,456 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 133 | 55 | 1,105 |
JavaScript | 3 | 17 | 0 | 209 |
CSS | 2 | 12 | 0 | 142 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 66.00 |
▷ Minimum class complexity | 66.00 |
▷ Maximum class complexity | 66.00 |
Average method complexity | 10.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 31 | |
▷ Named functions | 29 | 93.55% |
▷ Anonymous functions | 2 | 6.45% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/ksher-wechat.png | 38.64KB | 12.41KB | ▼ 67.88% |
assets/img/ksher-kbank.png | 5.93KB | 3.14KB | ▼ 47.09% |
(invalid) assets/img/ksher-atome.png | 65.03KB | 0.00KB | ▼ 100.00% |
assets/img/ksher-bbl.png | 4.47KB | 2.03KB | ▼ 54.64% |
assets/img/ksher-promptpay.png | 24.47KB | 8.25KB | ▼ 66.30% |