Benchmarks
Plugin footprint 40% 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
- The plugin cannot be installed
- > Warning in wp-content/plugins/browser-blocker/browser_blocker.php+620
in_array() expects parameter 2 to be array, bool given
Server metrics [RAM: ▲0.06MB] [CPU: ▼263.66ms] Passed 4 tests
This is a short check of server-side resources used by Browser Blocker
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.89 ▲0.17 | 40.32 ▲19.82 |
Dashboard /wp-admin | 3.12 ▲0.06 | 44.15 ▼0.59 |
Posts /wp-admin/edit.php | 3.17 ▲0.06 | 39.93 ▼3.42 |
Add New Post /wp-admin/post-new.php | 5.48 ▲0.05 | 89.08 ▼1,045.20 |
Media Library /wp-admin/upload.php | 3.06 ▲0.05 | 33.91 ▼5.43 |
Browser Blocker /wp-admin/options-general.php?page=Browser_Blocker_Admin | 3.01 | 27.70 |
Server storage [IO: ▲0.37MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 12 new options
New WordPress options |
---|
Browser_Blocker_Code |
Browser_Blocker_Title |
Browser_Blocker_DwnldDesc |
Browser_Blocker_Display_Browsers |
Browser_Blocker_Splash_Img |
Browser_Blocker_Enabled |
Browser_Blocker_Pages |
Browser_Blocker_Bypass |
Browser_Blocker_Msg |
Browser_Blocker_Credit |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Browser Blocker
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,678 ▲72 | 15.79 ▼0.12 | 8.65 ▼0.15 | 51.53 ▲3.93 |
Dashboard /wp-admin | 2,935 ▲82 | 5.93 ▲0.07 | 134.99 ▼11.61 | 114.28 ▲7.70 |
Posts /wp-admin/edit.php | 2,711 ▲8 | 2.68 ▼0.02 | 64.68 ▲3.23 | 87.81 ▲5.10 |
Add New Post /wp-admin/post-new.php | 1,856 ▲268 | 19.16 ▼2.76 | 375.83 ▲94.60 | 104.70 ▼4.16 |
Media Library /wp-admin/upload.php | 1,780 ▲8 | 4.99 ▼0.01 | 140.53 ▼6.75 | 110.50 ▼13.44 |
Browser Blocker /wp-admin/options-general.php?page=Browser_Blocker_Admin | 955 | 2.09 | 52.91 | 55.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/browser-blocker/browser_blocker.php+741
mktime(): You should be using the time() function instead
- Zombie WordPress options were found after uninstall: 12 options
- Browser_Blocker_Code
- Browser_Blocker_Display_Browsers
- Browser_Blocker_BPtext
- Browser_Blocker_DwnldDesc
- Browser_Blocker_Msg
- Browser_Blocker_Enabled
- Browser_Blocker_Title
- Browser_Blocker_Splash_Img
- Browser_Blocker_Blocked
- Browser_Blocker_Bypass
- ...
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=Browser_Blocker_Admin
- > Warning in wp-includes/class-wp-hook.php+303
call_user_func_array() expects parameter 1 to be a valid callback, function 'BrowserBlocker_Options_Page' not found or invalid function name
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
Almost there! Just fix the following items
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Parse error
syntax error, unexpected end of file in wp-content/plugins/browser-blocker/splash.php on line 207
- > PHP Fatal error
Uncaught Error: Call to undefined function BrowserBlocker_GetBlocked() in wp-content/plugins/browser-blocker/advanced.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/browser-blocker/browser_blocker.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function BrowserBlocker_GetBlocked() in wp-content/plugins/browser-blocker/simple.php:1
- > PHP Parse error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Screenshots: Add images for these screenshots: #1 (Simple Admin Interface), #2 (Advanced Admin Interface), #3 (Default Splash Page)
- Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
browser-blocker/browser_blocker.php 85% from 13 tests
The main PHP file in "Browser Blocker" ver. 0.5.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 273 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("browser-blocker.php" instead of "browser_blocker.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,724 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 173 | 481 | 1,724 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 118.00 |
▷ Minimum class complexity | 118.00 |
▷ Maximum class complexity | 118.00 |
Average method complexity | 3.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.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 | 55 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 19 | 34.55% |
▷ Protected methods | 36 | 65.45% |
▷ Private methods | 0 | 0.00% |
Functions | 10 | |
▷ Named functions | 10 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 55 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 55 | 100.00% |
▷ Public constants | 55 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 0.16MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/bb-64.png | 10.23KB | 3.62KB | ▼ 64.64% |
images/exclamation.png | 1.51KB | 1.40KB | ▼ 7.07% |
images/edit.png | 0.67KB | 0.83KB | 0.00% |
images/globe.png | 1.50KB | 1.40KB | ▼ 6.39% |
images/bb-16.png | 1.08KB | 1.15KB | 0.00% |