79% add-admin-css

Code Review | Add Admin CSS

WordPress plugin Add Admin CSS scored79%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: 6.3.1
  • 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

35 reviews

Install metrics

10,000+ active /117,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short 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.65 ▲0.1939.04 ▼2.83
Dashboard /wp-admin3.51 ▲0.2147.71 ▼1.59
Posts /wp-admin/edit.php3.63 ▲0.2746.19 ▼3.97
Add New Post /wp-admin/post-new.php6.09 ▲0.2179.82 ▼13.92
Media Library /wp-admin/upload.php3.43 ▲0.2139.24 ▲4.61
Admin CSS /wp-admin/themes.php?page=add-admin-css/add-admin-css.php3.4134.21

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Add Admin CSS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.071.64 ▼0.3339.78 ▼2.53
Dashboard /wp-admin2,207 ▲195.80 ▲0.9398.91 ▼18.7440.57 ▼4.34
Posts /wp-admin/edit.php2,101 ▲332.05 ▼0.0136.33 ▼0.1031.77 ▼2.01
Add New Post /wp-admin/post-new.php1,519 ▼1417.66 ▼5.50690.16 ▲20.9759.59 ▲4.18
Media Library /wp-admin/upload.php1,403 ▲184.25 ▼0.0294.34 ▼6.9441.09 ▼3.98
Admin CSS /wp-admin/themes.php?page=add-admin-css/add-admin-css.php1,0913.2477.5047.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/add-admin-css/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server errors when accessed directly:
    • > 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
    • > 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

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: admin, style, coffee2code, css, admin theme...

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

The principal PHP file in "Add Admin CSS" v. 2.0.1 is loaded by WordPress automatically on each request
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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,791 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP63756971,411
Markdown3600345
Bourne Shell16221
XML10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
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
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes133.33%
Methods126
▷ Static methods97.14%
▷ Public methods11288.89%
▷ Protected methods1411.11%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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%