Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.19MB] [CPU: ▼9.27ms] 75% from 4 tests
Analyzing server-side resources used by DBargain
It is recommended to improve the following
- CPU: Total CPU usage should be kept under 500.00ms (currently 729.77ms on /wp-admin/admin.php?page=dbargain)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 36.69 ▼6.59 |
Dashboard /wp-admin | 3.49 ▲0.19 | 48.21 ▼4.27 |
Posts /wp-admin/edit.php | 3.60 ▲0.25 | 50.55 ▲4.90 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.20 | 85.15 ▼17.50 |
Media Library /wp-admin/upload.php | 3.41 ▲0.18 | 36.22 ▼8.73 |
All Offers /wp-admin/admin.php?page=dbargain | 3.38 | 729.77 |
Session Chat History /wp-admin/admin.php?page=chat | 3.38 | 31.19 |
Settings /wp-admin/admin.php?page=dbargain_settings | 3.38 | 465.84 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
recovery_mode_email_last_sent |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for DBargain
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,961 ▲226 | 13.92 ▼0.38 | 5.47 ▲3.51 | 37.84 ▼9.02 |
Dashboard /wp-admin | 2,261 ▲70 | 5.28 ▲0.39 | 111.12 ▼5.20 | 42.22 ▼11.43 |
Posts /wp-admin/edit.php | 2,146 ▲60 | 2.43 ▲0.39 | 42.62 ▲8.74 | 34.75 ▲0.25 |
Add New Post /wp-admin/post-new.php | 1,557 ▲29 | 23.54 ▲5.17 | 683.14 ▲45.69 | 36.88 ▼20.70 |
Media Library /wp-admin/upload.php | 1,446 ▲55 | 4.52 ▲0.31 | 98.41 ▲2.59 | 42.89 ▲2.10 |
All Offers /wp-admin/admin.php?page=dbargain | 844 | 2.11 | 27.60 | 24.25 |
Session Chat History /wp-admin/admin.php?page=chat | 708 | 1.14 | 7.30 | 21.45 |
Settings /wp-admin/admin.php?page=dbargain_settings | 844 | 2.09 | 28.97 | 25.01 |
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: 7 options
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- recovery_mode_email_last_sent
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dbargain_settings
- > Warning in wp-content/plugins/d-bargain/templates/expire.php+4
session_start(): Cannot start session when headers already sent
- > GET request to /wp-admin/admin.php?page=chat
- > Notice in wp-content/plugins/d-bargain/templates/chat.php+15
Undefined variable: sid
- > GET request to /wp-admin/admin.php?page=chat
- > Notice in wp-content/plugins/d-bargain/templates/chat.php+15
Undefined variable: pid
- > GET request to /wp-admin/admin.php?page=chat
- > Error in wp-content/plugins/d-bargain/templates/chat.php+25
Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/d-bargain/templates/chat.php:25
Stack trace:
#0 wp-content/plugins/d-bargain/include/class-dbargain.php(562): require_once()
#1 wp-includes/class-wp-hook.php(310): DBargain::chat()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown
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 fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/d-bargain/include/class-dbargain.php:168
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: bargaining plugin wordpress, bargaining tool, bargain, tool to boost sales, d-bargain...
d-bargain/d-bargain.php 85% from 13 tests
The entry point to "DBargain" version 4.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "4.2.0")
- Text Domain: The text domain name should consist of only dashes and lowercase characters
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,802 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 324 | 221 | 1,651 |
JavaScript | 2 | 31 | 10 | 151 |
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.37 |
Average class complexity | 56.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 108.00 |
Average method complexity | 4.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 36.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 23 | 71.88% |
▷ Public methods | 32 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
include/assets/cart_img.png | 16.25KB | 10.10KB | ▼ 37.87% |