Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.16MB] [CPU: ▼5.46ms] Passed 4 tests
A check of server-side resources used by Catch Dark Mode
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.19 | 42.14 ▲2.76 |
Dashboard /wp-admin | 3.47 ▲0.12 | 46.09 ▼14.52 |
Posts /wp-admin/edit.php | 3.58 ▲0.23 | 50.22 ▲7.19 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 83.95 ▼10.10 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 32.88 ▲0.02 |
Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Catch Dark Mode
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,121 ▲349 | 13.44 ▼0.84 | 10.25 ▲8.34 | 46.55 ▲2.50 |
Dashboard /wp-admin | 2,284 ▲110 | 5.52 ▲0.00 | 90.20 ▼2.14 | 77.51 ▲32.65 |
Posts /wp-admin/edit.php | 2,189 ▲89 | 1.97 ▲0.00 | 36.01 ▼4.41 | 33.44 ▼8.82 |
Add New Post /wp-admin/post-new.php | 1,772 ▲246 | 23.27 ▲0.05 | 720.98 ▲64.28 | 53.00 ▼3.22 |
Media Library /wp-admin/upload.php | 1,489 ▲89 | 4.22 ▲0.01 | 96.97 ▼5.86 | 63.78 ▲20.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/catch-dark-mode/plugin.php
- 14× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/templates/switch-style/style-8.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-dark-mode/admin/partials/dashboard.php:19
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/templates/switch-style/style-1.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/catch-dark-mode/includes/jetpack-compatibility.php:4
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/templates/switch-style/style-2.php:2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/templates/switch-style/style-5.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-dark-mode/admin/partials/sidebar.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/catch-dark-mode/admin/partials/footer.php:4
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/templates/switch-style/style-7.php:2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/catch-dark-mode/includes/dynamic.css.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: dark, mode, color, css
catch-dark-mode/plugin.php 85% from 13 tests
The primary PHP file in "Catch Dark Mode" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("catch-dark-mode.php" instead of "plugin.php")
- Description: Please don't use more than 140 characters for the plugin description (currently 254 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
No dangerous file extensions were detected3,794 lines of code in 52 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 25 | 316 | 775 | 1,690 |
CSS | 3 | 233 | 39 | 1,595 |
JavaScript | 6 | 84 | 159 | 295 |
SVG | 18 | 0 | 4 | 214 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 2.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 1 | 12.50% |
Methods | 52 | |
▷ Static methods | 3 | 5.77% |
▷ Public methods | 45 | 86.54% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 13.46% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 8 | |
▷ Global constants | 8 | 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
15 PNG files occupy 0.22MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/css/light.png | 11.72KB | 5.39KB | ▼ 53.99% |
image/button/style-8.png | 6.64KB | 2.21KB | ▼ 66.69% |
admin/images/free-plugin-246x116.png | 8.01KB | 3.81KB | ▼ 52.42% |
image/button/style-5.png | 8.03KB | 3.19KB | ▼ 60.35% |
image/button/style-1.png | 6.94KB | 3.40KB | ▼ 51.04% |