Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼3.09ms] Passed 4 tests
This is a short check of server-side resources used by WPC Price by User Role for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.08 | 38.21 ▼1.43 |
Dashboard /wp-admin | 3.39 ▲0.08 | 44.04 ▼5.57 |
Posts /wp-admin/edit.php | 3.50 ▲0.14 | 46.30 ▲0.50 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 83.23 ▼5.85 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 35.62 ▲1.32 |
About /wp-admin/admin.php?page=wpclever | 3.28 | 29.46 |
Essential Kit /wp-admin/admin.php?page=wpclever-kit | 3.28 | 31.24 |
Server storage [IO: ▲0.12MB] [DB: ▲0.02MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by WPC Price by User Role for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,877 ▲142 | 13.55 ▼0.83 | 1.69 ▼0.27 | 42.87 ▲1.91 |
Dashboard /wp-admin | 2,280 ▲92 | 5.88 ▲0.97 | 95.86 ▼7.78 | 73.59 ▲29.58 |
Posts /wp-admin/edit.php | 2,166 ▲77 | 2.04 ▲0.01 | 37.69 ▲1.83 | 35.29 ▼1.49 |
Add New Post /wp-admin/post-new.php | 1,751 ▲218 | 24.35 ▲1.29 | 643.49 ▼41.36 | 55.57 ▲3.42 |
Media Library /wp-admin/upload.php | 1,468 ▲80 | 4.28 ▲0.08 | 98.35 ▼9.83 | 71.81 ▲26.64 |
About /wp-admin/admin.php?page=wpclever | 1,393 | 2.12 | 29.77 | 35.20 |
Essential Kit /wp-admin/admin.php?page=wpclever-kit | 5,725 | 2.16 | 33.82 | 66.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
Smoke tests 50% 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)
Good news, no errors were detected
SRP 50% from 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
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpc-price-by-user-role/wpc-price-by-user-role.php:19
- > PHP Fatal error
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)
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=wpclever-kit
- > Network (severe)
https://api.wpclever.net/images/wpc-attribute-groups.png - Failed to load resource: the server responded with a status of 404 ()
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: Add a description for screenshot #1 in wpc-price-by-user-role/assets to your readme.txt
wpc-price-by-user-role/wpc-price-by-user-role.php Passed 13 tests
The main file in "WPC Price by User Role for WooCommerce" v. 2.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
99 characters long description:
WPC Price by User Role helps you configure discounts and adjust prices in bulk based on user roles.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,962 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 4 | 257 | 149 | 1,264 |
PHP | 9 | 184 | 35 | 1,046 |
Sass | 1 | 53 | 0 | 366 |
JavaScript | 3 | 44 | 3 | 257 |
SVG | 1 | 0 | 0 | 29 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 24.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 4.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.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 | 47 | |
▷ Static methods | 11 | 23.40% |
▷ Public methods | 46 | 97.87% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.13% |
Functions | 3 | |
▷ Named functions | 2 | 66.67% |
▷ Anonymous functions | 1 | 33.33% |
Constants | 9 | |
▷ Global constants | 9 | 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
No PNG files were detected