Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.12MB] [CPU: ▼3.08ms] 75% from 4 tests
Analyzing server-side resources used by DarkLooks - Dark Mode Switcher For WordPress
The following require your attention
- CPU: The total CPU usage must kept under 500.00ms (currently 687.22ms on /wp-admin/admin.php?page=darklooks-recommended-plugin)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.28 | 43.72 ▼1.14 |
Dashboard /wp-admin | 3.42 ▲0.08 | 57.42 ▼5.85 |
Posts /wp-admin/edit.php | 3.54 ▲0.18 | 55.55 ▲4.90 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.12 | 88.62 ▼7.47 |
Media Library /wp-admin/upload.php | 3.34 ▲0.12 | 41.15 ▲2.16 |
Recommended Plugins /wp-admin/admin.php?page=darklooks-recommended-plugin | 3.49 | 687.22 |
Settings /wp-admin/admin.php?page=darklooks-setting-admin | 3.70 | 43.79 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] 67% from 3 tests
A short overview of filesystem and database impact
It is recommended to fix the following issues
- There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/darklooks-dark-mode-switcher/" and "wp-content/uploads/"
- (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 97 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
darklooks_options |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
DarkLooks - Dark Mode Switcher For WordPress: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,982 ▲196 | 13.63 ▼0.98 | 5.97 ▲3.87 | 42.03 ▼1.42 |
Dashboard /wp-admin | 2,246 ▲40 | 5.91 ▲1.03 | 102.84 ▼6.25 | 78.23 ▲37.71 |
Posts /wp-admin/edit.php | 2,125 ▲25 | 2.01 ▼0.02 | 39.27 ▲0.86 | 34.45 ▼0.42 |
Add New Post /wp-admin/post-new.php | 1,545 ▼0 | 23.13 ▲0.08 | 770.03 ▲100.94 | 52.48 ▼7.87 |
Media Library /wp-admin/upload.php | 1,422 ▲22 | 4.17 ▼0.04 | 116.37 ▲1.12 | 50.00 ▼1.49 |
Recommended Plugins /wp-admin/admin.php?page=darklooks-recommended-plugin | 1,202 | 2.04 | 25.67 | 28.14 |
Settings /wp-admin/admin.php?page=darklooks-setting-admin | 2,922 | 5.70 | 115.37 | 120.59 |
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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=darklooks-recommended-plugin
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
SRP 50% from 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
Please fix the following items
- 9× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/darklooks-dark-mode-switcher/darklooks.php:28
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Custom_CSS.php:14
- > PHP Fatal error
Trait 'Darklooks\\Admin\\Controllers\\Color_Picker' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/inc/Controller_Base.php on line 14
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Time_Based.php:14
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Advance_Setting.php:14
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Image_Settings.php:14
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Color_Preset.php:14
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/Switch_Setting.php:13
- > PHP Fatal error
Uncaught Error: Class 'Darklooks\\Admin\\Inc\\Controller_Base' not found in wp-content/plugins/darklooks-dark-mode-switcher/admin/tab-templates/General_Setting.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 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
Please fix the following attributes:
- Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in darklooks-dark-mode-switcher/assets to your readme.txt
- Requires php: Invalid plugin version format
darklooks-dark-mode-switcher/darklooks.php 85% from 13 tests
The principal PHP file in "DarkLooks - Dark Mode Switcher For WordPress" v. 1.0.6 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("darklooks-dark-mode-switcher.php" instead of "darklooks.php")
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 plugin3,550 lines of code in 70 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 39 | 489 | 802 | 2,425 |
CSS | 2 | 106 | 23 | 792 |
JavaScript | 2 | 70 | 61 | 174 |
SVG | 26 | 0 | 0 | 135 |
JSON | 1 | 1 | 0 | 24 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 6.69 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 2.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 13 | |
Classes | 22 | |
▷ Abstract classes | 1 | 4.55% |
▷ Concrete classes | 21 | 95.45% |
▷ Final classes | 1 | 4.76% |
Methods | 157 | |
▷ Static methods | 88 | 56.05% |
▷ Public methods | 133 | 84.71% |
▷ Protected methods | 3 | 1.91% |
▷ Private methods | 21 | 13.38% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 8 | |
▷ Global constants | 7 | 87.50% |
▷ Class constants | 1 | 12.50% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/assets/img/icons/switcher11.png | 1.05KB | 0.71KB | ▼ 32.31% |
admin/assets/img/icons/color3.png | 0.90KB | 0.67KB | ▼ 25.27% |
admin/assets/img/icons/select-arrow.png | 0.32KB | 0.24KB | ▼ 25.08% |
admin/assets/img/logo-icon.png | 0.48KB | 0.31KB | ▼ 36.18% |
admin/assets/img/full.png | 2.38KB | 1.20KB | ▼ 49.80% |