Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.25MB] [CPU: ▲0.61ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Wholesale Discount
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.71 ▲0.25 | 40.89 ▼0.63 |
Dashboard /wp-admin | 3.55 ▲0.25 | 59.97 ▲11.62 |
Posts /wp-admin/edit.php | 3.66 ▲0.31 | 51.45 ▼1.63 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 101.54 ▲4.10 |
Media Library /wp-admin/upload.php | 3.47 ▲0.24 | 36.37 ▲0.61 |
Wholesale Discount /wp-admin/admin.php?page=wwsd-wholesale-discount | 3.42 | 36.33 |
Server storage [IO: ▲0.40MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-comments |
wwsd_discount_type |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
wwsd_woocommerce_wholesale_discount_curr_ver |
recovery_mode_email_last_sent |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Wholesale Discount
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,809 ▲48 | 14.78 ▲0.43 | 1.70 ▼0.05 | 44.21 ▼1.99 |
Dashboard /wp-admin | 2,213 ▲33 | 4.98 ▼0.72 | 107.33 ▲1.38 | 42.37 ▼2.27 |
Posts /wp-admin/edit.php | 2,118 ▲15 | 2.43 ▲0.43 | 45.35 ▼0.54 | 35.08 ▼5.02 |
Add New Post /wp-admin/post-new.php | 1,545 ▲19 | 23.34 ▲0.18 | 618.07 ▼73.27 | 34.74 ▼37.14 |
Media Library /wp-admin/upload.php | 1,421 ▲24 | 4.57 ▲0.36 | 101.88 ▼11.60 | 45.04 ▲1.84 |
Wholesale Discount /wp-admin/admin.php?page=wwsd-wholesale-discount | 698 | 1.56 | 13.45 | 16.71 |
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
It is recommended to fix the following
- The uninstall procedure has failed, leaving 9 options in the database
- db_upgraded
- recovery_mode_email_last_sent
- wwsd_woocommerce_wholesale_discount_curr_ver
- can_compress_scripts
- widget_recent-comments
- wwsd_discount_type
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=wwsd-wholesale-discount
- > Error in wp-content/plugins/woo-wholesale-discount/classes/class-wwd-main.php+1087
Uncaught Error: Call to undefined function get_woocommerce_currency_symbol() in wp-content/plugins/woo-wholesale-discount/classes/class-wwd-main.php:1087
Stack trace:
#0 wp-includes/class-wp-hook.php(310): WwsdWholesaleDiscountClass::wwsd_wholesale_discount_submenu_callback()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/admin.php(259): do_action()
#4 {main}
thrown
SRP Passed 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
No output text or server-side errors detected on direct access of PHP files
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
- > GET request to /wp-admin/admin.php?page=wwsd-wholesale-discount
- > Console-api (severe) in wp-content/plugins/woo-wholesale-discount/assets/js/woo-cat-choices.js?ver=6.3.1+0:24242
Could not find passed element or passed element was of an invalid type
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (Global Settings page of plugin), #2 (Set Discount rule for product), #3 (Sample of Category Discount rule), #4 (Sample of Cart page view), #5 (Sample of Checkout page view), #6 (Sample of Order detail page view)
woo-wholesale-discount/woo-wholesale-discount.php 92% from 13 tests
The main PHP file in "WooCommerce Wholesale Discount" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Text Domain: The text domain should only use lowercase characters and dashes
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
Success! There were no dangerous files found in this plugin2,344 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 426 | 258 | 1,476 |
CSS | 5 | 66 | 12 | 602 |
JavaScript | 4 | 97 | 84 | 266 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 322.00 |
▷ Minimum class complexity | 322.00 |
▷ Maximum class complexity | 322.00 |
Average method complexity | 12.89 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 85.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 | 27 | |
▷ Static methods | 25 | 92.59% |
▷ Public methods | 27 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 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
6 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 36.99KB | 19.89KB | ▼ 46.24% |
screenshot-6.png | 10.46KB | 6.96KB | ▼ 33.45% |
screenshot-3.png | 34.38KB | 18.07KB | ▼ 47.44% |
screenshot-2.png | 27.21KB | 15.76KB | ▼ 42.08% |
screenshot-4.png | 21.93KB | 11.48KB | ▼ 47.66% |