Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.96ms] Passed 4 tests
This is a short check of server-side resources used by WPG Detect Browser
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 36.58 ▼4.84 |
Dashboard /wp-admin | 3.31 ▲0.00 | 49.57 ▲0.82 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.59 ▼4.28 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 84.07 ▼4.90 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.48 ▼1.80 |
Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by WPG Detect Browser
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.29 ▼0.96 | 1.57 ▼0.36 | 39.15 ▼14.72 |
Dashboard /wp-admin | 2,209 ▲21 | 4.82 ▼1.02 | 109.58 ▼8.63 | 37.85 ▼8.29 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 1.97 ▼0.03 | 41.22 ▲5.39 | 35.33 ▼0.07 |
Add New Post /wp-admin/post-new.php | 1,513 ▼20 | 17.89 ▼5.37 | 578.33 ▼60.13 | 47.43 ▼12.75 |
Media Library /wp-admin/upload.php | 1,391 ▲9 | 4.18 ▲0.01 | 98.01 ▼1.76 | 42.77 ▲0.40 |
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
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 9× PHP files trigger errors when accessed directly with GET requests:
- > PHP Notice
Undefined index: HTTP_USER_AGENT in wp-content/plugins/wpg-detect-browser/index.php on line 14
- > PHP Notice
Undefined variable: ub in wp-content/plugins/wpg-detect-browser/index.php on line 68
- > PHP Notice
Undefined index: HTTP_USER_AGENT in wp-content/plugins/wpg-detect-browser/index.php on line 14
- > PHP Notice
Undefined offset: 1 in wp-content/plugins/wpg-detect-browser/index.php on line 84
- > PHP Notice
Undefined variable: ub in wp-content/plugins/wpg-detect-browser/index.php on line 68
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpg-detect-browser/index.php:119
- > PHP Notice
Undefined variable: ub in wp-content/plugins/wpg-detect-browser/index.php on line 80
- > PHP Notice
Undefined variable: ub in wp-content/plugins/wpg-detect-browser/index.php on line 80
- > PHP Notice
Undefined offset: 1 in wp-content/plugins/wpg-detect-browser/index.php on line 84
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: comments, wpg, css, browser, detect
wpg-detect-browser/index.php 92% from 13 tests
This is the main PHP file of "WPG Detect Browser" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpg-detect-browser.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected93 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 13 | 20 | 93 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin