Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼0.76ms] Passed 4 tests
This is a short check of server-side resources used by ELEX WooCommerce Dynamic Pricing and Discounts
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 35.29 ▼0.59 |
Dashboard /wp-admin | 3.31 ▲0.01 | 43.67 ▼3.93 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 43.92 ▼1.97 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 88.97 ▲7.35 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.28 ▲3.44 |
Server storage [IO: ▲5.52MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 164 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
ELEX WooCommerce Dynamic Pricing and Discounts: 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,806 ▲60 | 13.32 ▼1.05 | 1.61 ▲0.08 | 39.08 ▼5.33 |
Dashboard /wp-admin | 2,212 ▲21 | 5.83 ▲0.95 | 95.46 ▼5.41 | 40.96 ▼4.33 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 2.01 ▼0.00 | 35.47 ▼1.99 | 38.01 ▲3.21 |
Add New Post /wp-admin/post-new.php | 1,539 ▲17 | 23.24 ▼0.26 | 644.43 ▲0.65 | 64.70 ▲6.53 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.29 ▲0.10 | 96.07 ▼5.11 | 40.56 ▼1.55 |
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
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/review_and_troubleshoot_notify/resources/logo.php
- 7× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/elex-common-functions.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/review_and_troubleshoot_notify/resources/review.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/admin/ui/view/market.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/review_and_troubleshoot_notify/resources/troubleshoot.php:59
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/wf_api_manager/html/html-wf-activation-window.php:111
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/admin/elex-ajax-function.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/elex-woocommerce-dynamic-pricing-and-discounts/includes/wf_api_manager/wf-api-manager-config.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, dynamic pricing, price rule, dynamic discount, bulk discount
elex-woocommerce-dynamic-pricing-and-discounts/elex-dynamic-pricing-and-discounts-for-woocommerce-basic-version.php 77% from 13 tests
"ELEX WooCommerce Dynamic Pricing and Discounts" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("elex-woocommerce-dynamic-pricing-and-discounts.php" instead of "elex-dynamic-pricing-and-discounts-for-woocommerce-basic-version.php")
- Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin57,230 lines of code in 107 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 12 | 151 | 244 | 23,932 |
JSON | 4 | 0 | 0 | 14,984 |
PHP | 59 | 1,218 | 972 | 8,746 |
PO File | 9 | 1,710 | 5,202 | 5,350 |
JavaScript | 6 | 626 | 242 | 1,886 |
SVG | 13 | 0 | 0 | 1,463 |
HTML | 1 | 97 | 16 | 445 |
Sass | 3 | 44 | 15 | 424 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 1,035)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.74 |
Average class complexity | 82.31 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,035.00 |
Average method complexity | 13.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 93.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 16 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 109 | |
▷ Static methods | 5 | 4.59% |
▷ Public methods | 101 | 92.66% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 7.34% |
Functions | 45 | |
▷ Named functions | 43 | 95.56% |
▷ Anonymous functions | 2 | 4.44% |
Constants | 3 | |
▷ Global constants | 3 | 100.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
41 PNG files occupy 2.23MB with 1.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/wsdesk.png | 161.93KB | 43.90KB | ▼ 72.89% |
admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.10KB | 0.17KB | 0.00% |
jquery-ui/images/ui-icons_cc0000_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
img/catalog_mode.png | 85.64KB | 21.17KB | ▼ 75.28% |
img/dynamic_pricing.png | 90.78KB | 22.92KB | ▼ 74.75% |