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 gracefully, with no errors
Server metrics [RAM: ▲0.08MB] [CPU: ▼141.88ms] Passed 4 tests
A check of server-side resources used by Netbiscuits Device Detection
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.90 ▲0.06 | 37.50 ▲2.39 |
Dashboard /wp-admin | 3.15 ▲0.09 | 46.48 ▼1.00 |
Posts /wp-admin/edit.php | 3.26 ▲0.15 | 48.75 ▼0.23 |
Add New Post /wp-admin/post-new.php | 5.50 ▲0.07 | 100.29 ▼564.21 |
Media Library /wp-admin/upload.php | 3.09 ▲0.09 | 34.32 ▼2.08 |
NB DD /wp-admin/options-general.php?page=netbiscuits-device-detection | 3.06 | 30.04 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 4 new options
New WordPress options |
---|
nb_dd_token |
nb_dd_debug |
nb_dd_account |
nb_dd_profile |
Browser metrics Passed 4 tests
Checking browser requirements for Netbiscuits Device Detection
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,684 ▲88 | 15.96 ▲0.28 | 8.72 ▲2.00 | 49.19 ▲3.54 |
Dashboard /wp-admin | 2,997 ▲66 | 5.96 ▲0.02 | 141.63 ▼2.20 | 120.26 ▼0.83 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.70 ▲0.01 | 72.20 ▲3.15 | 97.44 ▲6.01 |
Add New Post /wp-admin/post-new.php | 1,607 ▼76 | 18.88 ▲0.29 | 389.41 ▼23.96 | 116.05 ▲1.97 |
Media Library /wp-admin/upload.php | 1,812 ▲5 | 5.01 ▼0.00 | 157.31 ▲10.50 | 125.00 ▲4.27 |
NB DD /wp-admin/options-general.php?page=netbiscuits-device-detection | 1,112 | 2.08 | 60.52 | 75.57 |
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
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 4 options
- nb_dd_token
- nb_dd_debug
- nb_dd_profile
- nb_dd_account
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)
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/netbiscuits-device-detection/nb-dd.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: device detection, netbiscuits
netbiscuits-device-detection/nb-dd.php 77% from 13 tests
The principal PHP file in "Netbiscuits Device Detection" v. 1.7 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 285 characters long)
- Text Domain: The text domain name should consist of only dashes and lowercase characters
- Main file name: It is recommended to name the main PHP file as the plugin slug ("netbiscuits-device-detection.php" instead of "nb-dd.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 detected507 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 102 | 218 | 507 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 39.00 |
▷ Minimum class complexity | 39.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 2.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.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 | 37 | |
▷ Static methods | 3 | 8.11% |
▷ Public methods | 32 | 86.49% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 13.51% |
Functions | 6 | |
▷ Named functions | 6 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected