Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
- Install procedure had errors
- > Notice in wp-content/plugins/simple-discount-badge/main.php+95
Trying to access array offset on value of type bool
Server metrics [RAM: ▲0.02MB] [CPU: ▼138.61ms] Passed 4 tests
An overview of server-side resources used by Simple Discount Badge for Woocommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 33.04 ▲8.60 |
Dashboard /wp-admin | 3.08 ▲0.02 | 46.99 ▲3.80 |
Posts /wp-admin/edit.php | 3.13 ▲0.02 | 45.50 ▼1.81 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 89.96 ▼557.68 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 33.44 ▲1.25 |
Simple Discount Badge /wp-admin/options-general.php?page=simple_discount_badge | 2.99 | 24.16 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options |
---|
sdb_setting_page_settings |
Browser metrics Passed 4 tests
Checking browser requirements for Simple Discount Badge for Woocommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,712 ▲116 | 16.06 ▲0.02 | 11.55 ▲2.09 | 46.25 ▼4.36 |
Dashboard /wp-admin | 3,000 ▲69 | 6.56 ▲0.52 | 144.04 ▼8.54 | 110.78 ▼21.96 |
Posts /wp-admin/edit.php | 2,775 ▲36 | 3.01 ▲0.30 | 75.15 ▲11.90 | 87.26 ▲5.55 |
Add New Post /wp-admin/post-new.php | 1,707 ▲126 | 18.36 ▼0.91 | 382.52 ▼19.44 | 102.98 ▼1.37 |
Media Library /wp-admin/upload.php | 1,766 ▼44 | 5.42 ▲0.38 | 151.42 ▼11.07 | 115.59 ▲1.19 |
Simple Discount Badge /wp-admin/options-general.php?page=simple_discount_badge | 1,632 | 3.22 | 92.50 | 97.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 1 option
- sdb_setting_page_settings
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 no errors were found, this is by no means an exhaustive test
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
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-discount-badge/settings.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-discount-badge/main.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: products, woocommerce shop, woocommerce, themes, badge...
simple-discount-badge/main.php 85% from 13 tests
This is the main PHP file of "Simple Discount Badge for Woocommerce" version 1.0.1, 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:
- Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.2")
- Main file name: The principal plugin file should be the same as the plugin slug ("simple-discount-badge.php" instead of "main.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin290 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 63 | 36 | 287 |
JavaScript | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 20 | |
▷ Named functions | 20 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin