Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.03ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce Cart Count Shortcode
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.79 ▲0.14 |
Dashboard /wp-admin | 3.31 ▲0.00 | 44.37 ▼1.98 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.07 ▲1.09 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.49 ▼19.37 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.22 ▲2.98 |
Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Cart Count Shortcode
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.35 ▼1.40 | 1.75 ▼0.24 | 42.87 ▲2.50 |
Dashboard /wp-admin | 2,206 ▲21 | 4.86 ▼0.23 | 100.23 ▼13.14 | 37.95 ▲0.46 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.04 ▲0.03 | 40.28 ▲5.92 | 34.21 ▲3.32 |
Add New Post /wp-admin/post-new.php | 1,514 ▼7 | 17.84 ▼5.31 | 658.09 ▼11.94 | 58.45 ▲2.43 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.18 ▼0.02 | 94.51 ▼4.62 | 41.37 ▼2.33 |
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
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 50% 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
Please fix the following items
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
require_once(): Failed opening required 'woocommerce-cart-count-shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-cart-count-shortcode/tests/test-woocommerce-cart-count-shortcode.php on line 2
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-cart-count-shortcode/tests/bootstrap.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woo-cart-count-shortcode/woocommerce-cart-count-shortcode.php:89
- > PHP Warning
require_once(woocommerce-cart-count-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/woo-cart-count-shortcode/tests/test-woocommerce-cart-count-shortcode.php on line 2
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/woo-cart-count-shortcode/tests/bootstrap.php on line 6
- > 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 96% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: count, cart count, cart, link, shopping cart...
woo-cart-count-shortcode/woocommerce-cart-count-shortcode.php 92% from 13 tests
"WooCommerce Cart Count Shortcode" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("woo-cart-count-shortcode.php" instead of "woocommerce-cart-count-shortcode.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin657 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 65 | 10 | 208 |
Bourne Shell | 3 | 41 | 14 | 198 |
Dockerfile | 1 | 23 | 4 | 119 |
Bourne Again Shell | 2 | 7 | 1 | 71 |
Markdown | 1 | 17 | 0 | 47 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.11 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 23 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 23 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.54MB with 0.32MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-256x256.png | 9.50KB | 4.35KB | ▼ 54.23% |
assets/banner-772x250.png | 21.07KB | 8.98KB | ▼ 57.39% |
assets/screenshot-1.png | 526.92KB | 182.96KB | ▼ 65.28% |