Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/style-switcher/core/StyleSwitcher.class.php+22
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.87MB] [CPU: ▼52.69ms] Passed 4 tests
An overview of server-side resources used by Style Switcher
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.11 ▼1.35 | 6.79 ▼33.51 |
Dashboard /wp-admin | 2.13 ▼1.17 | 7.77 ▼45.91 |
Posts /wp-admin/edit.php | 2.13 ▼1.22 | 8.87 ▼37.34 |
Add New Post /wp-admin/post-new.php | 2.13 ▼3.75 | 7.90 ▼93.98 |
Media Library /wp-admin/upload.php | 2.13 ▼1.09 | 6.11 ▼30.84 |
Style Switcher Options /wp-admin/options-general.php?page=style-switcher-options | 2.14 | 8.26 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Style Switcher
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,887 ▲141 | 13.58 ▼1.16 | 9.41 ▲7.47 | 43.06 ▼2.51 |
Dashboard /wp-admin | 2,213 ▲25 | 5.02 ▼0.85 | 101.91 ▼20.20 | 40.48 ▼7.28 |
Posts /wp-admin/edit.php | 2,090 ▲1 | 1.99 ▼0.06 | 38.60 ▲1.74 | 34.96 ▼0.30 |
Add New Post /wp-admin/post-new.php | 1,414 ▼107 | 17.90 ▼5.42 | 595.19 ▼70.18 | 46.85 ▼16.20 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.22 ▲0.09 | 98.82 ▼10.37 | 47.22 ▲0.50 |
Style Switcher Options /wp-admin/options-general.php?page=style-switcher-options | 791 | 2.08 | 24.92 | 27.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/style-switcher/core/StyleSwitcher.class.php+22
Trying to access array offset on value of type bool
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=style-switcher-options
- > Notice in wp-content/plugins/style-switcher/core/StyleSwitcherSettings.class.php+93
Trying to access array offset on value of type bool
- > GET request to /wp-admin/options-general.php?page=style-switcher-options
- > Warning in wp-content/plugins/style-switcher/core/StyleSwitcherSettings.class.php+93
sizeof(): Parameter must be an array or an object that implements Countable
SRP 0% 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
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/style-switcher/style-switcher.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'StyleSwitcher\\StyleSwitcherConstants' not found in wp-content/plugins/style-switcher/core/StyleSwitcherSettings.class.php:279
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: developers, themes, styles, testing
style-switcher/style-switcher.php Passed 13 tests
"Style Switcher" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
Plugin to provide interfaces for client theme tweaks
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected533 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 128 | 17 | 391 |
JavaScript | 2 | 15 | 1 | 90 |
CSS | 2 | 18 | 0 | 52 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 10.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 2.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 25 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 23 | 92.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 8.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 2 | 50.00% |
▷ Class constants | 2 | 50.00% |
▷ Public constants | 2 | 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
No PNG files were detected