79% force-admin-color-scheme

Code Review | Force Admin Color Scheme

WordPress plugin Force Admin Color Scheme scored79%from 54 tests.

About plugin

  • Plugin page: force-admin-color...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Oct 15, 2021
  • Number of updates: 10
  • Update frequency: every 204.5 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /7,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.93ms] Passed 4 tests

An overview of server-side resources used by Force Admin Color Scheme
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.40 ▼5.42
Dashboard /wp-admin3.35 ▲0.0544.72 ▼1.20
Posts /wp-admin/edit.php3.40 ▲0.0546.17 ▼2.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0579.74 ▼22.77
Media Library /wp-admin/upload.php3.27 ▲0.0536.82 ▲2.92

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Force Admin Color Scheme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.373.98 ▲2.3240.48 ▼1.97
Dashboard /wp-admin2,206 ▲154.86 ▼0.02106.61 ▲6.6239.14 ▼1.07
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0040.03 ▲0.1834.80 ▼0.32
Add New Post /wp-admin/post-new.php1,514 ▼923.54 ▲0.35655.36 ▼3.3860.38 ▲2.26
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0694.92 ▼21.5441.16 ▼7.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/force-admin-color-scheme/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/force-admin-color-scheme/tests/phpunit/bootstrap.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/force-admin-color-scheme/tests/phpunit/bootstrap.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: admin colors, staging, coffee2code, admin, color scheme

force-admin-color-scheme/force-admin-color-scheme.php Passed 13 tests

The main file in "Force Admin Color Scheme" v. 2.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Force a single admin color scheme for all users of the site.

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
There were no executable files found in this plugin747 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4239323569
Markdown3320143
Bourne Shell16221
XML10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity18.00
▷ Minimum class complexity2.00
▷ Maximum class complexity34.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods82
▷ Static methods1923.17%
▷ Public methods8097.56%
▷ Protected methods00.00%
▷ Private methods22.44%
Functions12
▷ Named functions18.33%
▷ Anonymous functions1191.67%
Constants3
▷ Global constants3100.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