Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼2.68ms] Passed 4 tests
A check of server-side resources used by UserAgent Themes Switcher
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.12 | 44.79 ▲3.15 |
Dashboard /wp-admin | 3.40 ▲0.06 | 49.24 ▼15.75 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 54.52 ▲5.34 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 90.57 ▼3.44 |
Media Library /wp-admin/upload.php | 3.33 ▲0.09 | 43.57 ▲7.24 |
UserAgentThemesSwitcher /wp-admin/options-general.php?page=UserAgentThemesSwitcher | 3.30 | 36.00 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
uat_switcher |
db_upgraded |
Browser metrics Passed 4 tests
UserAgent Themes Switcher: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲47 | 14.72 ▲0.37 | 1.78 ▼0.04 | 38.49 ▼5.78 |
Dashboard /wp-admin | 2,199 ▲32 | 5.60 ▲0.02 | 87.79 ▼25.72 | 41.16 ▼1.17 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 1.99 ▲0.03 | 41.37 ▲3.47 | 37.89 ▲3.56 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 23.65 ▲0.53 | 683.95 ▼7.17 | 60.28 ▼0.25 |
Media Library /wp-admin/upload.php | 1,404 ▲10 | 4.21 ▲0.09 | 97.80 ▼3.13 | 40.94 ▼3.90 |
UserAgentThemesSwitcher /wp-admin/options-general.php?page=UserAgentThemesSwitcher | 1,455 | 1.99 | 21.88 | 27.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/useragent-themes-switcher/lib/class-useragentthemesswitcheradmin.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/useragent-themes-switcher/lib/class-useragentthemesswitcheradmin.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/useragent-themes-switcher/lib/class-useragentthemesswitcher.php:37
- > PHP Fatal error
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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: themes, useragent, browser
useragent-themes-switcher/useragentthemesswitcher.php 92% from 13 tests
This is the main PHP file of "UserAgent Themes Switcher" version 2.04, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("useragent-themes-switcher.php" instead of "useragentthemesswitcher.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected453 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 59 | 140 | 453 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 34.50 |
▷ Minimum class complexity | 15.00 |
▷ Maximum class complexity | 54.00 |
Average method complexity | 4.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 11 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 81.82% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 18.18% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin