Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼4.91ms] Passed 4 tests
This is a short check of server-side resources used by Buy one Get one Free - Other similar BOGO WooCommerce discount rule maker
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 36.36 ▼7.17 |
Dashboard /wp-admin | 3.32 ▼0.03 | 52.04 ▼9.38 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.37 ▲2.62 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 81.43 ▼3.97 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.60 ▲0.88 |
Server storage [IO: ▲1.67MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
Buy one Get one Free - Other similar BOGO WooCommerce discount rule maker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,821 ▲70 | 14.13 ▼0.21 | 2.07 ▲0.37 | 39.44 ▼4.84 |
Dashboard /wp-admin | 2,204 ▲23 | 5.55 ▼0.12 | 96.48 ▼17.41 | 43.55 ▼1.74 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.03 ▲0.09 | 40.06 ▲6.72 | 38.04 ▲2.89 |
Add New Post /wp-admin/post-new.php | 1,532 ▼2 | 23.04 ▲0.04 | 604.45 ▼5.23 | 51.31 ▼3.13 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.14 ▼0.03 | 100.86 ▲0.91 | 42.67 ▼1.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 were found after uninstall: 6 options
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/buy-one-get-one-free/admin/partials/explain.php
- > /wp-content/plugins/buy-one-get-one-free/includes/pisol.class.form.php
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/buy-one-get-one-free/public/class-woo.php:5
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/buy-one-get-one-free/admin/class-buy-one-get-one-free-woocommerce-category.php:207
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buy-one-get-one-free/admin/class-buy-one-get-one-free-woocommerce-option.php:133
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buy-one-get-one-free/admin/class-buy-one-get-one-free-woocommerce-product.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/buy-one-get-one-free/includes/includes.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/buy-one-get-one-free/includes/banner-sample.php:63
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buy-one-get-one-free/admin/class-buy-one-get-one-free-woocommerce-cat-message.php:103
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 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
These attributes need your attention:
- Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #6, #7, #9 in buy-one-get-one-free/assets to your readme.txt
buy-one-get-one-free/buy-one-get-one-free-woocommerce.php 85% from 13 tests
The main file in "Buy one Get one Free - Other similar BOGO WooCommerce discount rule maker" v. 1.10.32 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buy-one-get-one-free.php" instead of "buy-one-get-one-free-woocommerce.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected14,538 lines of code in 38 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 3 | 2,057 | 20 | 9,451 |
SVG | 6 | 5 | 5 | 3,232 |
PHP | 26 | 486 | 499 | 1,754 |
JavaScript | 3 | 22 | 33 | 101 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 10.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 54.00 |
Average method complexity | 2.51 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 126 | |
▷ Static methods | 22 | 17.46% |
▷ Public methods | 121 | 96.03% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 3.97% |
Functions | 10 | |
▷ Named functions | 7 | 70.00% |
▷ Anonymous functions | 3 | 30.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.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
7 PNG files occupy 0.94MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/background.png | 74.27KB | 26.29KB | ▼ 64.60% |
admin/img/close.png | 4.32KB | 3.39KB | ▼ 21.57% |
admin/img/single-product.png | 236.96KB | 64.81KB | ▼ 72.65% |
admin/img/product-variation.png | 291.95KB | 76.81KB | ▼ 73.69% |
admin/img/product-page.png | 282.15KB | 75.31KB | ▼ 73.31% |