Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.21MB] [CPU: ▼4.20ms] Passed 4 tests
Analyzing server-side resources used by Dark Mode Toggle
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.20 | 36.29 ▼7.83 |
Dashboard /wp-admin | 3.58 ▲0.23 | 44.48 ▼13.27 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 50.04 ▲2.53 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.21 | 98.17 ▲7.21 |
Media Library /wp-admin/upload.php | 3.44 ▲0.21 | 39.34 ▲1.77 |
Dark Mode /wp-admin/themes.php?page=darkmodetg-settings | 3.48 | 33.75 |
Server storage [IO: ▲0.34MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Dark Mode Toggle
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,863 ▲101 | 14.76 ▲0.64 | 4.27 ▲2.62 | 54.31 ▲12.12 |
Dashboard /wp-admin | 2,196 ▲16 | 5.58 ▼0.08 | 92.57 ▼7.42 | 38.31 ▼3.35 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.01 ▲0.07 | 38.20 ▼2.91 | 33.13 ▼0.32 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.14 ▼0.14 | 650.30 ▼28.96 | 56.32 ▼2.61 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.20 ▲0.02 | 96.03 ▼13.55 | 40.81 ▼3.35 |
Dark Mode /wp-admin/themes.php?page=darkmodetg-settings | 2,378 | 2.88 | 68.57 | 98.94 |
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
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 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 SRP test was a success
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: dark theme, toggle, dark, night mode, dark mode
dark-mode-toggle/dark-mode-toggle.php Passed 13 tests
"Dark Mode Toggle" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
128 characters long description:
Bring dark mode toggle switch to your WordPress website. A simple switch to turn on and off the dark mode. Fast and easy to use.
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
No dangerous file extensions were detected4,834 lines of code in 36 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 7 | 154 | 62 | 3,518 |
PHP | 27 | 341 | 559 | 1,314 |
CSS | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 8.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.69 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 1 | |
Traits | 2 | |
Classes | 11 | |
▷ Abstract classes | 1 | 9.09% |
▷ Concrete classes | 10 | 90.91% |
▷ Final classes | 0 | 0.00% |
Methods | 67 | |
▷ Static methods | 8 | 11.94% |
▷ Public methods | 66 | 98.51% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.49% |
Functions | 5 | |
▷ Named functions | 4 | 80.00% |
▷ Anonymous functions | 1 | 20.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/Dark-Mode-Toggle-Pro.png | 18.92KB | 19.68KB | 0.00% |