84% default-admin-color-scheme

Code Review | Default Admin Color Scheme

WordPress plugin Default Admin Color Scheme scored84%from 54 tests.

About plugin

  • Plugin page: default-admin-col...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 26, 2013
  • Latest release: May 17, 2022
  • Number of updates: 23
  • Update frequency: every 144.3 days
  • Top authors: barryceelen (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

700+ active /8,946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Default Admin Color Scheme
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.62 ▼0.67
Dashboard /wp-admin3.33 ▼0.0144.85 ▼13.41
Posts /wp-admin/edit.php3.38 ▲0.0348.62 ▲2.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.55 ▼7.06
Media Library /wp-admin/upload.php3.25 ▲0.0338.66 ▲6.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
plugin_default_admin_color_scheme
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Default Admin Color Scheme
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.40 ▼0.162.00 ▲0.1843.98 ▼1.57
Dashboard /wp-admin2,206 ▲174.84 ▼0.12107.78 ▼12.5841.44 ▼0.73
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0538.63 ▲2.2334.78 ▲3.08
Add New Post /wp-admin/post-new.php1,534 ▲2022.75 ▲5.12618.21 ▼97.2656.26 ▼10.52
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0295.70 ▼1.5240.95 ▼3.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/default-admin-color-scheme/templates/settings-checkbox.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: staging, dashboard, branding, color scheme, admin...

default-admin-color-scheme/default-admin-color-scheme.php 85% from 13 tests

"Default Admin Color Scheme" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.8" instead of "3.8.0")
  • Requires PHP: Required version must match the one declared in readme.txt ("5.3" instead of "5.3.0")

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
Success! There were no dangerous files found in this plugin358 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP586248233
PO File2202278
JavaScript1121139
Markdown1708

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods525.00%
▷ Public methods1785.00%
▷ Protected methods00.00%
▷ Private methods315.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 images were found in this plugin