Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.43MB] [CPU: ▼1.09ms] Passed 4 tests
An overview of server-side resources used by WMF Theme Switcher
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.44 | 46.40 ▲2.33 |
Dashboard /wp-admin | 3.78 ▲0.44 | 54.76 ▼9.69 |
Posts /wp-admin/edit.php | 3.84 ▲0.48 | 51.81 ▼0.34 |
Add New Post /wp-admin/post-new.php | 6.32 ▲0.44 | 99.21 ▲3.95 |
Media Library /wp-admin/upload.php | 3.65 ▲0.42 | 41.68 ▲3.33 |
WMF Theme Switcher /wp-admin/options-general.php?page=wmf-mobile-theme-switcher/wmf-theme-switcher.php | 3.62 | 41.13 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
- The plugin illegally modified 1 file (96.05KB) outside of "wp-content/plugins/wmf-mobile-theme-switcher/" and "wp-content/uploads/"
- (new file) wp-content/mu-plugins/wmf-theme-switcher-mu.php
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for WMF Theme Switcher
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,798 ▲37 | 14.72 ▲0.37 | 1.78 ▼0.44 | 44.88 ▲1.67 |
Dashboard /wp-admin | 2,204 ▲36 | 5.64 ▲0.10 | 85.74 ▼8.79 | 37.71 ▼2.04 |
Posts /wp-admin/edit.php | 2,109 ▲9 | 1.98 ▼0.06 | 34.84 ▼3.76 | 37.92 ▲1.38 |
Add New Post /wp-admin/post-new.php | 1,536 ▲1 | 23.24 ▲5.05 | 608.86 ▼25.51 | 65.85 ▲3.49 |
Media Library /wp-admin/upload.php | 1,409 ▲9 | 4.24 ▲0.07 | 96.34 ▼7.06 | 42.90 ▼2.10 |
WMF Theme Switcher /wp-admin/options-general.php?page=wmf-mobile-theme-switcher/wmf-theme-switcher.php | 1,353 | 1.82 | 29.96 | 36.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP Passed 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success
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
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: mobile theme switcher, webbu, mobile detect, mobile browser detect, theme switcher...
wmf-mobile-theme-switcher/wmf-theme-switcher.php 92% from 13 tests
"WMF Theme Switcher" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("wmf-mobile-theme-switcher.php" instead of "wmf-theme-switcher.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
Success! There were no dangerous files found in this plugin2,517 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 407 | 1,322 | 1,776 |
JavaScript | 4 | 88 | 20 | 477 |
CSS | 1 | 33 | 12 | 264 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.78 |
Average class complexity | 89.75 |
▷ Minimum class complexity | 27.00 |
▷ Maximum class complexity | 134.00 |
Average method complexity | 4.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 77.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 91 | |
▷ Static methods | 18 | 19.78% |
▷ Public methods | 84 | 92.31% |
▷ Protected methods | 4 | 4.40% |
▷ Private methods | 3 | 3.30% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 23 | |
▷ Global constants | 5 | 21.74% |
▷ Class constants | 18 | 78.26% |
▷ Public constants | 18 | 100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/switch.png | 0.53KB | 0.64KB | 0.00% |
images/copy.png | 0.78KB | 0.87KB | 0.00% |