Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼2.50ms] Passed 4 tests
A check of server-side resources used by Multi Device Switcher
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 38.65 ▲3.93 |
Dashboard /wp-admin | 3.33 ▲0.03 | 43.91 ▼1.43 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 46.91 ▼5.63 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 84.37 ▼4.43 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 34.81 ▲1.50 |
Multi Device Switcher /wp-admin/themes.php?page=multi-device-switcher | 3.25 | 33.01 |
Server storage [IO: ▲0.33MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
widget_pc-switcher |
Browser metrics Passed 4 tests
Checking browser requirements for Multi Device Switcher
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.35 ▼1.41 | 1.67 ▼0.10 | 41.19 ▼0.62 |
Dashboard /wp-admin | 2,210 ▲22 | 4.90 ▼1.01 | 109.24 ▲11.24 | 40.45 ▼3.55 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.01 ▼0.02 | 40.00 ▼2.56 | 35.92 ▼6.22 |
Add New Post /wp-admin/post-new.php | 1,536 ▼1 | 23.22 ▼0.03 | 667.94 ▼12.97 | 63.22 ▲7.52 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.28 ▲0.06 | 103.54 ▼5.67 | 45.07 ▼3.35 |
Multi Device Switcher /wp-admin/themes.php?page=multi-device-switcher | 1,185 | 2.03 | 45.09 | 32.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_recent-posts
- widget_pc-switcher
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
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
The following issues need your attention
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multi-device-switcher/pc-switcher-widget.php:40
- > PHP Fatal error
Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/multi-device-switcher/wp-cli.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: These screenshots do not have images: #1 (Theme option), #2 (UserAgent option), #3 (PC Switcher option), #4 (PC Switcher button), #5 (Disable Switcher)
multi-device-switcher/multi-device-switcher.php Passed 13 tests
"Multi Device Switcher" version 1.8.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
This WordPress plugin allows you to set a separate theme for device (Smart Phone, Tablet PC, Mobile Phone, Game and custom).
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
There were no executable files found in this plugin1,327 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 243 | 795 | 1,157 |
PO File | 1 | 39 | 50 | 97 |
CSS | 2 | 0 | 0 | 61 |
JavaScript | 1 | 2 | 0 | 12 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 69.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 145.00 |
Average method complexity | 5.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 48 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 48 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
5 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 33.69KB | 10.18KB | ▼ 69.79% |
screenshot-5.png | 34.25KB | 10.12KB | ▼ 70.46% |
screenshot-4.png | 3.14KB | 1.80KB | ▼ 42.72% |
screenshot-1.png | 55.87KB | 17.30KB | ▼ 69.04% |
screenshot-2.png | 108.39KB | 29.68KB | ▼ 72.61% |