Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.12ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce New Product Badge
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.34 ▼3.27 |
Dashboard /wp-admin | 3.31 ▲0.00 | 51.70 ▼2.61 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 43.52 ▼7.08 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.74 ▼15.50 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.66 ▼1.30 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce New Product Badge
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.33 ▼1.03 | 4.91 ▲2.98 | 45.33 ▲1.99 |
Dashboard /wp-admin | 2,209 ▲21 | 4.80 ▼0.14 | 111.09 ▼6.12 | 42.68 ▼3.04 |
Posts /wp-admin/edit.php | 2,094 ▲5 | 2.01 ▲0.02 | 38.46 ▲2.32 | 30.29 ▼5.15 |
Add New Post /wp-admin/post-new.php | 1,534 ▲20 | 23.22 ▲5.59 | 633.95 ▼58.96 | 61.40 ▼0.20 |
Media Library /wp-admin/upload.php | 1,391 ▲3 | 4.21 ▲0.01 | 98.80 ▲1.46 | 41.90 ▼2.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
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)
Even though everything seems fine, this is not an exhaustive test
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 fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-new-product-badge/new-badge.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: new product, woocommerce, ecommerce, new
woocommerce-new-product-badge/new-badge.php 85% from 13 tests
This is the main PHP file of "WooCommerce New Product Badge" version 0.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-new-product-badge.php" instead of "new-badge.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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 plugin147 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 2 | 22 | 52 | 81 |
PHP | 1 | 25 | 34 | 53 |
CSS | 1 | 0 | 0 | 10 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 3.00 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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 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