Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.19MB] [CPU: ▼303.28ms] Passed 4 tests
Analyzing server-side resources used by Dark Mode Toggle
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.71 ▲0.20 | 56.15 ▼0.77 |
Dashboard /wp-admin | 3.61 ▲0.21 | 38.09 ▲1.78 |
Posts /wp-admin/edit.php | 3.84 ▲0.20 | 43.84 ▲2.48 |
Add New Post /wp-admin/post-new.php | 7.14 ▲0.17 | 94.69 ▼1,209.33 |
Media Library /wp-admin/upload.php | 3.56 ▲0.27 | 25.58 ▼4.78 |
Dark Mode /wp-admin/themes.php?page=darkmodetg-settings | 3.68 | 26.97 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, no new options
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 / | 3,857 ▲135 | 15.97 ▲0.41 | 8.26 ▲1.78 | 9.26 ▲6.61 |
Dashboard /wp-admin | 2,897 ▲36 | 6.14 ▼0.10 | 115.31 ▼25.11 | 155.35 ▼5.38 |
Posts /wp-admin/edit.php | 2,693 ▲5 | 3.24 ▲0.00 | 62.03 ▼11.20 | 134.68 ▼4.86 |
Add New Post /wp-admin/post-new.php | 1,664 ▼53 | 15.79 ▼5.54 | 399.74 ▼44.69 | 149.21 ▼7.89 |
Media Library /wp-admin/upload.php | 1,703 ▲5 | 5.52 ▼0.01 | 142.04 ▼7.74 | 186.30 ▼1.26 |
Dark Mode /wp-admin/themes.php?page=darkmodetg-settings | 2,954 | 3.99 | 91.76 | 197.81 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: toggle, dark, night mode, dark theme, dark mode
dark-mode-toggle/dark-mode-toggle.php Passed 13 tests
The entry point to "Dark Mode Toggle" version 1.0.5 is a PHP file that has certain tags in its header comment area
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 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,582 lines of code in 34 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 27 | 332 | 558 | 1,265 |
JavaScript | 5 | 63 | 0 | 315 |
CSS | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 8.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.62 |
▷ 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
PNG files should be compressed to save space and minimize bandwidth usage
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% |