89% dark-mode-for-wp-dashboard

Code Review | Dark Mode for WP Dashboard

WordPress plugin Dark Mode for WP Dashboard scored89%from 54 tests.

About plugin

  • Plugin page: dark-mode-for-wp-...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 22, 2020
  • Latest release: Mar 7, 2023
  • Number of updates: 39
  • Update frequency: every 22.2 days
  • Top authors: naiches (74.36%)supportwi (28.21%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active /25,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.57ms] Passed 4 tests

Analyzing server-side resources used by Dark Mode for WP Dashboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.57 ▲5.71
Dashboard /wp-admin3.31 ▲0.0148.69 ▼4.86
Posts /wp-admin/edit.php3.37 ▲0.0148.85 ▼15.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.16 ▼10.84
Media Library /wp-admin/upload.php3.24 ▲0.0136.18 ▼3.32

Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Dark Mode for WP Dashboard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.27 ▼1.381.83 ▲0.0144.90 ▼2.74
Dashboard /wp-admin2,224 ▲365.78 ▲0.88115.03 ▲5.9343.84 ▲3.47
Posts /wp-admin/edit.php2,107 ▲152.02 ▲0.0136.67 ▼1.1935.81 ▼1.02
Add New Post /wp-admin/post-new.php1,526 ▼717.56 ▼5.76678.94 ▼4.2060.11 ▼2.26
Media Library /wp-admin/upload.php1,409 ▲214.19 ▼0.0298.50 ▼13.7142.77 ▼7.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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
Looking good! No server-side errors or output on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: wordpress dark mode, dark mode dashboard, dark, wordpress dark theme, night mode...

dark-mode-for-wp-dashboard/dark-mode-dashboard.php 85% from 13 tests

"Dark Mode for WP Dashboard" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dark-mode-for-wp-dashboard.php" instead of "dark-mode-dashboard.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin8,615 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
Sass171,476104,298
CSS1105344,236
PHP1303281

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin