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.01MB] [CPU: ▼6.11ms] Passed 4 tests
Analyzing server-side resources used by eSewa - Nepal First Payment Gateway
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.01 | 40.15 ▼2.96 |
Dashboard /wp-admin | 3.31 ▲0.01 | 49.59 ▼1.99 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 44.56 ▼6.60 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 84.12 ▼12.90 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 38.40 ▲4.68 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for eSewa - Nepal First Payment Gateway
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,803 ▲42 | 14.76 ▲0.41 | 1.72 ▲0.05 | 43.88 ▲0.61 |
Dashboard /wp-admin | 2,209 ▲35 | 5.52 ▼0.02 | 88.43 ▼1.69 | 38.72 ▼4.32 |
Posts /wp-admin/edit.php | 2,114 ▲14 | 2.01 ▼0.02 | 35.28 ▼4.36 | 34.72 ▼3.32 |
Add New Post /wp-admin/post-new.php | 1,537 ▲4 | 23.09 ▲0.15 | 642.43 ▲21.17 | 54.99 ▲3.47 |
Media Library /wp-admin/upload.php | 1,408 ▲8 | 4.24 ▲0.07 | 97.92 ▼4.03 | 42.09 ▼6.35 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- 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)
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/esewa/method/inc/template/message-view.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/esewa/method/inc/order/order-detail.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (Plugin settings), #2 (checkout page), #3 (confirmation for proceeding to eSewa gateway)
- Contributors: Plugin contributors field is missing
esewa/index.php 85% from 13 tests
The main PHP file in "eSewa - Nepal First Payment Gateway" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("esewa.php" instead of "index.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin678 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 161 | 58 | 651 |
JavaScript | 2 | 5 | 6 | 27 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 15.80 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 3.18 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 1 | 20.00% |
▷ Concrete classes | 4 | 80.00% |
▷ Final classes | 1 | 25.00% |
Methods | 34 | |
▷ Static methods | 2 | 5.88% |
▷ Public methods | 20 | 58.82% |
▷ Protected methods | 12 | 35.29% |
▷ Private methods | 2 | 5.88% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/esewa_logo.png | 4.38KB | 2.67KB | ▼ 39.11% |
assets/images/esewa__.png | 6.96KB | 2.92KB | ▼ 58.13% |
assets/images/esewa_.png | 1.48KB | 1.38KB | ▼ 6.68% |
assets/images/esewa.png | 40.97KB | 16.02KB | ▼ 60.91% |