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: ▼2.47ms] Passed 4 tests
An overview of server-side resources used by Buy X Get Y Free by StorePro
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.72 ▼3.22 |
Dashboard /wp-admin | 3.30 ▲0.00 | 45.31 ▼7.26 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.90 ▲2.89 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 93.18 ▼1.02 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.77 ▲1.63 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Buy X Get Y Free by StorePro
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.70 ▲0.37 | 1.75 ▲0.12 | 39.54 ▼3.67 |
Dashboard /wp-admin | 2,195 ▲15 | 5.61 ▼0.05 | 92.82 ▲1.30 | 40.22 ▲3.09 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 2.01 ▲0.04 | 40.04 ▼3.39 | 35.12 ▲0.22 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 22.79 ▼0.40 | 598.79 ▼56.33 | 48.33 ▼6.72 |
Media Library /wp-admin/upload.php | 1,397 ▼0 | 4.19 ▼0.07 | 99.00 ▼6.52 | 44.21 ▼0.65 |
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
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/buy-x-get-y-free-by-storepro/Inc/bogo_by_sp_class_forms.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/buy-x-get-y-free-by-storepro/admin/bogo_by_sp_class_admin_option.php:199
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/buy-x-get-y-free-by-storepro/Inc/includes.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/buy-x-get-y-free-by-storepro/public/bogo_by_sp_class_cart.php:9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Screenshots: Please add images for these screenshots: #7 (Select the Quantity of Free Product), #8 (Save settings), #9 (How that would look to customer)
buy-x-get-y-free-by-storepro/bogo_by_sp.php 85% from 13 tests
Analyzing the main PHP file in "Buy X Get Y Free by StorePro" version 1.1.6
It is important to fix the following:
- Requires at least: Required version must be the same as the one declared in readme.txt ("5.8" instead of "2.2")
- Main file name: The principal plugin file should be the same as the plugin slug ("buy-x-get-y-free-by-storepro.php" instead of "bogo_by_sp.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,152 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 403 | 197 | 963 |
JavaScript | 1 | 42 | 5 | 187 |
CSS | 2 | 0 | 5 | 2 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 26.89 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 185.00 |
Average method complexity | 5.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.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 | 53 | |
▷ Static methods | 14 | 26.42% |
▷ Public methods | 50 | 94.34% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 5.66% |
Functions | 7 | |
▷ Named functions | 6 | 85.71% |
▷ Anonymous functions | 1 | 14.29% |
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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/Sp_bogo.png | 1.62KB | 1.86KB | 0.00% |