Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.41MB] [CPU: ▲0.64ms] Passed 4 tests
Server-side resources used by PHP Browser Detection
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.07 ▲1.61 | 53.71 ▲11.12 |
Dashboard /wp-admin | 5.09 ▲1.79 | 55.94 ▲8.84 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.84 ▼1.16 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 84.62 ▼7.73 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.37 ▲2.60 |
Server storage [IO: ▲1.83MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for PHP Browser Detection
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲53 | 14.26 ▼0.09 | 2.35 ▲0.43 | 42.98 ▲1.24 |
Dashboard /wp-admin | 2,195 ▲15 | 5.61 ▲0.01 | 82.96 ▼7.99 | 41.61 ▼2.06 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.01 | 35.65 ▼1.07 | 33.34 ▼2.25 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.62 ▲0.26 | 679.72 ▼3.08 | 64.11 ▲4.34 |
Media Library /wp-admin/upload.php | 1,400 ▲6 | 4.19 ▼0.02 | 99.07 ▼12.83 | 50.38 ▲7.34 |
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
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- 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
Good news, no errors were detected
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
Please fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/php-browser-detection/inc/tests.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/php-browser-detection/inc/admin.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/php-browser-detection/php-browser-detection.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/php-browser-detection/inc/shortcodes.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== php-browser-detection ===
)
php-browser-detection/php-browser-detection.php Passed 13 tests
This is the main PHP file of "PHP Browser Detection" version 3.1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
Use PHP to detect browsers for conditional CSS or to detect mobile phones.
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
Success! There were no dangerous files found in this plugin41,878 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
INI | 1 | 9,661 | 836 | 30,469 |
PHP | 7 | 299 | 681 | 11,405 |
Markdown | 1 | 2 | 0 | 4 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 67.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 133.00 |
Average method complexity | 6.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 24 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 37.50% |
▷ Protected methods | 15 | 62.50% |
▷ Private methods | 0 | 0.00% |
Functions | 33 | |
▷ Named functions | 33 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 14 | |
▷ Global constants | 1 | 7.14% |
▷ Class constants | 13 | 92.86% |
▷ Public constants | 13 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin