Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼297.48ms] Passed 4 tests
Analyzing server-side resources used by Dark Mode Lite
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.02 | 56.50 ▲1.51 |
Dashboard /wp-admin | 3.44 ▲0.03 | 36.53 ▲0.80 |
Posts /wp-admin/edit.php | 3.66 ▲0.02 | 42.15 ▲1.83 |
Add New Post /wp-admin/post-new.php | 6.90 ▼0.07 | 95.19 ▼1,192.67 |
Media Library /wp-admin/upload.php | 3.32 ▲0.02 | 29.79 ▲0.46 |
Dark Mode Lite /wp-admin/options-general.php?page=dml-index | 3.37 | 23.82 |
Server storage [IO: ▲1.45MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options |
---|
dml_display_dark_mode_visitor |
dml_low_image_brightness |
dml_floating_switch_position |
dml_image_brightness_level |
dml_display_dark_mode_admin |
dml_dark_mode_by_default |
Browser metrics Passed 4 tests
An overview of browser requirements for Dark Mode Lite
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,898 ▲156 | 16.55 ▲0.90 | 12.19 ▲6.17 | 2.37 ▲0.17 |
Dashboard /wp-admin | 2,859 ▲1 | 6.68 ▲0.46 | 123.23 ▼8.12 | 191.71 ▲22.73 |
Posts /wp-admin/edit.php | 2,683 ▼8 | 3.31 ▲0.07 | 69.40 ▲6.21 | 188.69 ▲43.36 |
Add New Post /wp-admin/post-new.php | 1,778 ▲26 | 24.36 ▲2.43 | 402.03 ▼36.96 | 147.25 ▼10.30 |
Media Library /wp-admin/upload.php | 1,690 ▼11 | 5.85 ▲0.31 | 132.66 ▼14.37 | 217.16 ▲24.99 |
Dark Mode Lite /wp-admin/options-general.php?page=dml-index | 1,576 | 3.08 | 67.20 | 164.27 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- dml_floating_switch_position
- dml_display_dark_mode_admin
- dml_dark_mode_by_default
- dml_display_dark_mode_visitor
- dml_low_image_brightness
- dml_image_brightness_level
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
The smoke test was a success, however most plugin functionality was not tested
SRP 50% 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
The following issues need your attention
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dark-mode-lite/views/main-container.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dark-mode-lite/index.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/dark-mode-lite/includes/save_advanced.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/dark-mode-lite/includes/get_settings.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/dark-mode-lite/includes/save_general.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/dark-mode-lite/includes/save_style.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
- Donate link: Invalid url: ""
dark-mode-lite/index.php 77% from 13 tests
The main file in "Dark Mode Lite" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Text Domain: Please use dashes and lowercase characters for text domains
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dark-mode-lite.php" instead of "index.php")
- Description: The description should be shorter than 140 characters (currently 209 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin16,325 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 1,286 | 167 | 9,864 |
JavaScript | 5 | 859 | 320 | 3,428 |
SVG | 1 | 0 | 0 | 2,671 |
PHP | 7 | 119 | 34 | 362 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
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 | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
styles/images/logo_menu.png | 1.56KB | 0.35KB | ▼ 77.82% |