89% add-admin-css

Code Review | Add Admin CSS

WordPress plugin Add Admin CSS scored 89% from 54 tests.

About plugin

  • Plugin page: add-admin-css
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Dec 5, 2011
  • Latest release: May 31, 2021
  • Number of updates: 20
  • Update frequency: every 174.1 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

10,000+ active / 105,549 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼288.19ms] Passed 4 tests

A check of server-side resources used by Add Admin CSS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2654.05 ▲7.67
Dashboard /wp-admin3.62 ▲0.2235.63 ▼0.14
Posts /wp-admin/edit.php3.85 ▲0.2138.24 ▼0.42
Add New Post /wp-admin/post-new.php7.08 ▲0.1296.08 ▼1,156.80
Media Library /wp-admin/upload.php3.50 ▲0.2127.66 ▲4.61
Admin CSS /wp-admin/themes.php?page=add-admin-css/add-admin-css.php3.6223.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Add Admin CSS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.89 ▲0.266.11 ▼0.762.80 ▲0.36
Dashboard /wp-admin2,890 ▲296.13 ▼0.01121.52 ▼18.90154.37 ▼11.38
Posts /wp-admin/edit.php2,703 ▲93.24 ▲0.0064.48 ▲0.69142.80 ▼3.28
Add New Post /wp-admin/post-new.php1,778 ▲11721.71 ▲5.14465.75 ▲43.78161.26 ▲3.75
Media Library /wp-admin/upload.php1,716 ▲245.56 ▲0.03145.05 ▲1.16193.59 ▲2.64
Admin CSS /wp-admin/themes.php?page=add-admin-css/add-admin-css.php1,3614.17105.44161.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/add-admin-css/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server errors 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/add-admin-css/tests/phpunit/bootstrap.php on line 19
    • > 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/add-admin-css/tests/phpunit/bootstrap.php on line 19

User-side errors Passed 1 test

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


Plugin configuration Passed 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
7 plugin tags: coffee2code, style, stylesheets, admin, admin theme...

add-admin-css/add-admin-css.php Passed 13 tests

The main PHP script in "Add Admin CSS" version 2.0.1 is automatically included on every request by WordPress
92 characters long description:
Easily define additional CSS (inline and/or by URL) to be added to all administration pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,791 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell16221

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity47.75
▷ Minimum class complexity3.00
▷ Maximum class complexity139.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes133.33%
▷ Static methods97.14%
▷ Public methods11288.89%
▷ Protected methods1411.11%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
c2c_minilogo.png3.49KB1.91KB▼ 45.43%