Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.08MB] [CPU: ▼5.85ms] Passed 4 tests
An overview of server-side resources used by UserAgent Content Switcher
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.08 | 37.07 ▼5.42 |
Dashboard /wp-admin | 3.39 ▲0.08 | 46.34 ▲2.31 |
Posts /wp-admin/edit.php | 3.44 ▲0.08 | 49.88 ▼2.22 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 85.02 ▼18.07 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 39.00 ▲5.44 |
UserAgentContentSwitcher /wp-admin/options-general.php?page=UserAgentContentSwitcher | 3.28 | 31.98 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
uac_switcher |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for UserAgent Content Switcher
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,821 ▲75 | 14.28 ▼0.10 | 1.82 ▲0.07 | 36.66 ▼5.65 |
Dashboard /wp-admin | 2,205 ▲25 | 5.59 ▼0.02 | 87.89 ▼9.69 | 39.88 ▼1.95 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.00 ▼0.02 | 41.15 ▲3.68 | 38.47 ▲4.41 |
Add New Post /wp-admin/post-new.php | 1,532 ▲6 | 22.90 ▼0.20 | 682.54 ▼3.79 | 53.37 ▲1.84 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.23 ▼0.00 | 94.57 ▼3.35 | 44.45 ▲2.97 |
UserAgentContentSwitcher /wp-admin/options-general.php?page=UserAgentContentSwitcher | 1,110 | 1.99 | 23.35 | 28.98 |
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
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
- 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-content-switcher/lib/class-useragentcontentswitcheradmin.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/useragent-content-switcher/lib/class-useragentcontentswitcher.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/useragent-content-switcher/lib/class-useragentcontentswitcheradmin.php:39
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: browser, user agent, useragent, web browser, phone...
useragent-content-switcher/useragentcontentswitcher.php 92% from 13 tests
The principal PHP file in "UserAgent Content Switcher" v. 3.05 is loaded by WordPress automatically on each request
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("useragent-content-switcher.php" instead of "useragentcontentswitcher.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin390 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 56 | 143 | 390 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 30.00 |
▷ Minimum class complexity | 14.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 4.10 |
▷ 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 | 8 | 72.73% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 27.27% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin