89% admin-dark-mode

Code Review | Admin Dark Mode

WordPress plugin Admin Dark Mode scored89%from 54 tests.

About plugin

  • Plugin page: admin-dark-mode
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 16, 2018
  • Latest release: Sep 1, 2018
  • Number of updates: 11
  • Update frequency: every 90.0 days
  • Top authors: jtigerson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,864 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Admin Dark Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.23 ▲4.87
Dashboard /wp-admin3.32 ▲0.0143.78 ▼7.94
Posts /wp-admin/edit.php3.37 ▲0.0145.64 ▼1.08
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.81 ▲1.11
Media Library /wp-admin/upload.php3.24 ▲0.0135.59 ▲0.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Admin Dark Mode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.59 ▼0.831.76 ▼0.2240.68 ▼3.29
Dashboard /wp-admin2,225 ▲374.87 ▼0.00109.62 ▼4.3338.61 ▼6.06
Posts /wp-admin/edit.php2,111 ▲222.04 ▼0.0140.65 ▲6.0034.46 ▲0.83
Add New Post /wp-admin/post-new.php1,526 ▼817.68 ▼5.37677.55 ▼14.5251.67 ▼3.62
Media Library /wp-admin/upload.php1,410 ▲224.28 ▲0.0698.28 ▲0.5641.49 ▼1.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in admin-dark-mode/assets to your readme.txt
You can look at the official readme.txt

admin-dark-mode/admin-dark-mode.php 92% from 13 tests

"Admin Dark Mode" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin1,964 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS24691,873
JavaScript118456
PHP1194435

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods375.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected