Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▼1.94ms] Passed 4 tests
Analyzing server-side resources used by Theme Switch in Mobile and Desktop
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 53.82 ▲11.49 |
Dashboard /wp-admin | 3.41 ▲0.10 | 54.44 ▼0.66 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 49.20 ▼1.25 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 87.34 ▼14.19 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 42.55 ▲8.33 |
Theme Switch in Mobile and Desktop /wp-admin/options-general.php?page=codepeople_theme_switch_slug | 3.32 | 43.30 |
Server storage [IO: ▲0.38MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Theme Switch in Mobile and Desktop
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.27 ▼0.13 | 1.96 ▲0.28 | 43.44 ▼3.34 |
Dashboard /wp-admin | 2,199 ▲22 | 5.58 ▼0.01 | 95.52 ▼6.27 | 42.75 ▲0.48 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▲0.01 | 33.14 ▼3.41 | 35.49 ▼1.31 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.36 ▲0.41 | 678.69 ▼22.59 | 59.51 ▲4.30 |
Media Library /wp-admin/upload.php | 1,401 ▲4 | 4.19 ▲0.02 | 106.30 ▲5.01 | 47.60 ▲0.26 |
Theme Switch in Mobile and Desktop /wp-admin/options-general.php?page=codepeople_theme_switch_slug | 1,574 | 9.19 | 293.73 | 32.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codepeople-theme-switch/banner.php:108
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codepeople-theme-switch/banner.php:108
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Tags: There are too many tags (20 tag instead of maximum 10)
codepeople-theme-switch/codepeople-theme-switch.php 85% from 13 tests
This is the main PHP file of "Theme Switch in Mobile and Desktop" version 1.0.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 362 characters long)
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin712 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 60 | 41 | 557 |
JavaScript | 2 | 16 | 6 | 95 |
PO File | 1 | 12 | 12 | 40 |
CSS | 2 | 0 | 0 | 20 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.81 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/empty.png | 0.18KB | 0.08KB | ▼ 54.70% |
styles/screenshot.png | 1.82KB | 1.61KB | ▼ 11.65% |