Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.23ms] Passed 4 tests
A check of server-side resources used by Price Per Unit For WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.93 ▼7.57 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.45 ▲2.05 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.00 ▼5.31 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 87.76 ▼7.07 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.86 ▼0.97 |
Server storage [IO: ▲0.49MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Price Per Unit For WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.24 ▼1.20 | 1.58 ▼0.16 | 40.08 ▼0.56 |
Dashboard /wp-admin | 2,203 ▲15 | 4.85 ▼1.01 | 115.89 ▼2.43 | 41.74 ▼3.25 |
Posts /wp-admin/edit.php | 2,089 ▲3 | 2.05 ▲0.05 | 38.84 ▲3.49 | 35.16 ▲1.67 |
Add New Post /wp-admin/post-new.php | 1,533 ▼3 | 23.28 ▲0.15 | 627.47 ▼29.70 | 55.02 ▼6.04 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.23 ▲0.00 | 93.70 ▼8.58 | 42.39 ▼1.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- can_compress_scripts
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)
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/price-per-unit-for-woocommerce/public/partials/price-per-unit-for-woocommerce-public-display.php
- > /wp-content/plugins/price-per-unit-for-woocommerce/admin/partials/price-per-unit-for-woocommerce-admin-display.php
- > /wp-content/plugins/price-per-unit-for-woocommerce/public/partials/svg.php
- 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/price-per-unit-for-woocommerce/Custom-Metabox/class-ap-custom-metabox-apply.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
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
Attributes that need to be fixed:
- Requires php: Invalid version format
price-per-unit-for-woocommerce/price-per-unit-for-woocommerce.php Passed 13 tests
This is the main PHP file of "Price Per Unit For WooCommerce" version 1.3.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin7,396 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 10 | 1,388 | 1,035 | 4,579 |
PHP | 15 | 447 | 769 | 1,751 |
CSS | 4 | 150 | 33 | 927 |
Markdown | 1 | 40 | 0 | 139 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 19.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 89.00 |
Average method complexity | 3.51 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 66 | |
▷ Static methods | 2 | 3.03% |
▷ Public methods | 61 | 92.42% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 7.58% |
Functions | 5 | |
▷ Named functions | 4 | 80.00% |
▷ Anonymous functions | 1 | 20.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
Custom-Metabox/Screenshot.png | 103.68KB | 36.59KB | ▼ 64.71% |