Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼8.08ms] Passed 4 tests
An overview of server-side resources used by Woocommerce Role Pricing
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.39 ▲1.28 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.60 ▼1.38 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 41.60 ▼3.22 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 79.37 ▼27.12 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.48 ▼0.61 |
Server storage [IO: ▲0.37MB] [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: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Woocommerce Role Pricing
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.77 ▲0.39 | 2.17 ▲0.50 | 45.89 ▲7.17 |
Dashboard /wp-admin | 2,206 ▲17 | 5.89 ▲0.95 | 113.65 ▲0.11 | 42.06 ▲2.70 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.05 ▼0.09 | 33.69 ▼7.91 | 34.57 ▲0.34 |
Add New Post /wp-admin/post-new.php | 1,519 ▼0 | 23.09 ▼0.40 | 655.22 ▲61.37 | 50.89 ▲6.00 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.20 ▼0.03 | 96.61 ▼7.80 | 42.41 ▼2.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
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)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woocommerce-role-pricing/woocommerce-role-pricing.php:40
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-role-pricing/woocommerce-role-pricing.php on line 37
- > PHP Notice
Trying to get property 'version' of non-object in wp-content/plugins/woocommerce-role-pricing/core/class-woorolepricinglight.php on line 30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocommerce-role-pricing/core/class-woorolepricinglight.php:33
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% 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
Attributes that require attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings: Roles - Roles dashboard section.), #3 (Prices - Different prices by user's role.)
woocommerce-role-pricing/woocommerce-role-pricing.php Passed 13 tests
"Woocommerce Role Pricing" version 3.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Shows different prices according to the user's role
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin757 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 138 | 177 | 658 |
PO File | 1 | 59 | 121 | 99 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 43.33 |
▷ Minimum class complexity | 34.00 |
▷ Maximum class complexity | 60.00 |
Average method complexity | 5.88 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 30.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 26 | |
▷ Static methods | 26 | 100.00% |
▷ Public methods | 24 | 92.31% |
▷ Protected methods | 2 | 7.69% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.32MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 60.78KB | 18.10KB | ▼ 70.22% |
assets/pro_features.png | 32.32KB | 9.83KB | ▼ 69.57% |
screenshot-2.png | 49.85KB | 14.06KB | ▼ 71.79% |
screenshot-3.png | 184.39KB | 84.58KB | ▼ 54.13% |