Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼138.93ms] Passed 4 tests
A check of server-side resources used by Bot Block - Stop Spam Referrals in Google Analytics
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.01 ▲0.18 | 31.33 ▲0.94 |
Dashboard /wp-admin | 3.14 ▲0.08 | 47.04 ▲1.13 |
Posts /wp-admin/edit.php | 3.19 ▲0.08 | 45.34 ▲0.05 |
Add New Post /wp-admin/post-new.php | 5.50 ▲0.06 | 89.31 ▼551.77 |
Media Library /wp-admin/upload.php | 3.08 ▲0.08 | 30.83 ▼4.94 |
Bot Block Options /wp-admin/options-general.php?page=bot_block | 3.03 | 34.00 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: 2 new tables, 1 new option
New tables |
---|
wp_bot_block_log |
wp_bot_block_block_list |
New WordPress options |
---|
bot_block |
Browser metrics Passed 4 tests
Checking browser requirements for Bot Block - Stop Spam Referrals in Google Analytics
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,697 ▲101 | 15.81 ▲0.12 | 7.79 ▼4.44 | 52.56 ▲4.82 |
Dashboard /wp-admin | 2,972 ▲41 | 5.96 ▼0.03 | 144.08 ▼0.11 | 108.38 ▼2.02 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.72 ▲0.00 | 68.89 ▲2.22 | 91.23 ▲9.75 |
Add New Post /wp-admin/post-new.php | 1,503 ▼180 | 18.58 ▼0.15 | 379.99 ▼23.59 | 114.54 ▲8.41 |
Media Library /wp-admin/upload.php | 1,815 ▲8 | 5.04 ▼0.00 | 160.47 ▼7.62 | 112.32 ▼8.09 |
Bot Block Options /wp-admin/options-general.php?page=bot_block | 2,115 | 4.88 | 81.60 | 102.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=bot_block
- > Warning in wp-content/plugins/bot-block-stop-spam-google-analytics-referrals/bot-block.php+566
date() expects parameter 2 to be int, string given
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 take a closer look at the following
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/bot-block-stop-spam-google-analytics-referrals/bot-block.php on line 21
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/bot-block-stop-spam-google-analytics-referrals/bot-block.php on line 21
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bot-block-stop-spam-google-analytics-referrals/bot-block.php on line 21
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
- Tags: Please delete some tags, you are using 14 tag instead of maximum 10
bot-block-stop-spam-google-analytics-referrals/bot-block.php 92% from 13 tests
"Bot Block - Stop Spam Referrals in Google Analytics" version 2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bot-block-stop-spam-google-analytics-referrals.php" instead of "bot-block.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
Good job! No executable or dangerous file extensions detected596 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 124 | 111 | 566 |
CSS | 1 | 4 | 0 | 30 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 46.00 |
▷ Minimum class complexity | 46.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 3.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.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 | 21 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 21 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
analyticsbanner.png | 27.32KB | 12.17KB | ▼ 55.47% |