Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▼1.17MB] [CPU: ▼38.94ms] Passed 4 tests
This is a short check of server-side resources used by Quantities and Units for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.80 ▼0.66 | 15.13 ▼28.15 |
Dashboard /wp-admin | 2.83 ▼0.47 | 19.83 ▼29.23 |
Posts /wp-admin/edit.php | 2.84 ▼0.52 | 16.78 ▼29.87 |
Add New Post /wp-admin/post-new.php | 2.84 ▼3.05 | 16.72 ▼68.49 |
Media Library /wp-admin/upload.php | 2.84 ▼0.39 | 18.51 ▼15.65 |
Add New /wp-admin/post-new.php?post_type=quantity-rule | 2.84 | 15.98 |
All Rules /wp-admin/edit.php?post_type=quantity-rule | 2.84 | 16.28 |
Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Quantities and Units for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,500 ▼257 | 13.15 ▼1.22 | 0.50 ▼1.55 | 18.10 ▼31.26 |
Dashboard /wp-admin | 2,244 ▲56 | 4.87 ▼0.02 | 99.40 ▼13.20 | 40.11 ▼1.84 |
Posts /wp-admin/edit.php | 2,124 ▲35 | 2.05 ▲0.06 | 41.08 ▲5.14 | 32.61 ▼3.62 |
Add New Post /wp-admin/post-new.php | 1,544 ▲24 | 23.28 ▲0.15 | 591.99 ▼123.15 | 57.37 ▼5.42 |
Media Library /wp-admin/upload.php | 1,423 ▲38 | 4.21 ▲0.07 | 99.66 ▼3.53 | 43.52 ▼4.54 |
Add New /wp-admin/post-new.php?post_type=quantity-rule | 1,805 | 2.63 | 47.90 | 70.31 |
All Rules /wp-admin/edit.php?post_type=quantity-rule | 1,218 | 1.96 | 33.12 | 31.88 |
Advanced Rules /wp-admin/class-wcqu-advanced-rules.php | 26 | 0.44 | 0.10 | 13.98 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- This plugin cannot be uninstalled
- > Warning in wp-admin/includes/plugin.php+294
opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=quantity-rule
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-admin/includes/plugin.php+294
opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
- 14 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=quantity-rule
- > Notice in wp-content/plugins/quantities-and-units-for-woocommerce/includes/class-wcqu-post-type.php+339
Trying to get property 'term_id' of non-object
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=quantity-rule
- > Notice in wp-content/plugins/quantities-and-units-for-woocommerce/includes/class-wcqu-post-type.php+340
Trying to get property 'name' of non-object
SRP 50% 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
The following issues need your attention
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/quantities-and-units-for-woocommerce/includes/wcqu-functions.php:421
- > 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)
Please take a look at the following user-side issues
- > GET request to /wp-admin/post-new.php?post_type=quantity-rule
- > Network (severe)
wp-content/plugins/quantities-and-units-for-woocommerce/assets/img/rapid-order-logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/class-wcqu-advanced-rules.php
- > Network (severe)
wp-admin/class-wcqu-advanced-rules.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Add an image for screenshot #1 (Required configuration for Out of Stock quantities to be displayed.)
quantities-and-units-for-woocommerce/quantites-and-units.php 92% from 13 tests
The main PHP script in "Quantities and Units for WooCommerce" version 1.0.13 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("quantities-and-units-for-woocommerce.php" instead of "quantites-and-units.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,999 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 562 | 539 | 1,792 |
CSS | 2 | 26 | 13 | 122 |
JavaScript | 2 | 30 | 29 | 85 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.68 |
Average class complexity | 39.22 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 93.00 |
Average method complexity | 5.99 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 39.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 | 69 | |
▷ Static methods | 1 | 1.45% |
▷ Public methods | 69 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 8 | 88.89% |
▷ Anonymous functions | 1 | 11.11% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.47MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/wpbo-logo.png | 24.75KB | 8.99KB | ▼ 63.66% |
screenshot-2.png | 115.13KB | 35.68KB | ▼ 69.00% |
screenshot-3.png | 35.57KB | 9.83KB | ▼ 72.35% |
screenshot-5.png | 78.40KB | 24.44KB | ▼ 68.83% |
screenshot-4.png | 50.66KB | 11.43KB | ▼ 77.43% |