Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼9.39ms] Passed 4 tests
This is a short check of server-side resources used by ELEX WooCommerce Role Based Pricing
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 37.84 ▼3.90 |
Dashboard /wp-admin | 3.31 ▼0.04 | 46.13 ▼19.99 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.13 ▲0.68 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.96 ▼10.43 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.85 ▼3.23 |
Server storage [IO: ▲0.76MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for ELEX WooCommerce Role Based Pricing
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.38 ▼0.16 | 1.88 ▼0.14 | 37.64 ▼6.50 |
Dashboard /wp-admin | 2,195 ▲18 | 5.60 ▼0.07 | 91.92 ▼6.16 | 40.68 ▼2.07 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.00 ▼0.03 | 36.36 ▲1.78 | 30.91 ▼5.39 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 23.31 ▲0.27 | 629.34 ▼67.50 | 51.21 ▼1.03 |
Media Library /wp-admin/upload.php | 1,400 ▲9 | 4.18 ▲0.01 | 94.39 ▼5.99 | 42.32 ▼3.74 |
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
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/elex-woocommerce-role-based-pricing-plugin-basic/review_and_troubleshoot_notify/resources/logo.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-role-based-pricing-plugin-basic/review_and_troubleshoot_notify/resources/review.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-role-based-pricing-plugin-basic/review_and_troubleshoot_notify/resources/troubleshoot.php:59
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-woocommerce-role-based-pricing-plugin-basic/includes/market.php:91
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: role based pricing, dynamic pricing, hide price, prices by user role, wholesale pricing
elex-woocommerce-role-based-pricing-plugin-basic/elex-rolebased-price-basic.php 69% from 13 tests
The principal PHP file in "ELEX WooCommerce Role Based Pricing" v. 1.4.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "2.6.0")
- Main file name: It is recommended to name the main PHP file as the plugin slug ("elex-woocommerce-role-based-pricing-plugin-basic.php" instead of "elex-rolebased-price-basic.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected10,445 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 1 | 6 | 0 | 6,712 |
PHP | 15 | 330 | 183 | 3,580 |
JavaScript | 1 | 20 | 5 | 153 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 101)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 83.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 397.00 |
Average method complexity | 6.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 101.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 83 | |
▷ Static methods | 5 | 6.02% |
▷ Public methods | 82 | 98.80% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.20% |
Functions | 11 | |
▷ Named functions | 7 | 63.64% |
▷ Anonymous functions | 4 | 36.36% |
Constants | 2 | |
▷ Global constants | 2 | 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
4 PNG files occupy 0.40MB with 0.30MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
resources/wsdesk.png | 161.93KB | 43.90KB | ▼ 72.89% |
resources/Dynamic Pricing & Discounts.png | 90.78KB | 22.92KB | ▼ 74.75% |
resources/Advanced Bulk Edit.png | 69.40KB | 15.94KB | ▼ 77.03% |
resources/prod-logo.png | 85.64KB | 21.17KB | ▼ 75.28% |