78% wp-add-custom-css

Code Review | WP Add Custom CSS

WordPress plugin WP Add Custom CSS scored 78% from 54 tests.

About plugin

  • Plugin page: wp-add-custom-css
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2014
  • Latest release: Sep 26, 2022
  • Number of updates: 55
  • Update frequency: every 53.0 days
  • Top authors: danieledesantis (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

100,000+ active / 868,764 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.39ms] Passed 4 tests

An overview of server-side resources used by WP Add Custom CSS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0838.93 ▼5.72
Dashboard /wp-admin3.39 ▲0.0946.47 ▼4.45
Posts /wp-admin/edit.php3.50 ▲0.1548.86 ▲0.39
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.43 ▼19.53
Media Library /wp-admin/upload.php3.31 ▲0.0835.34 ▲0.14

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Add Custom CSS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.17 ▼1.211.63 ▼0.1739.19 ▼11.47
Dashboard /wp-admin2,221 ▲334.94 ▼1.1295.09 ▼6.8162.52 ▲17.89
Posts /wp-admin/edit.php2,110 ▲212.02 ▲0.0239.56 ▲2.3233.62 ▲0.32
Add New Post /wp-admin/post-new.php6,460 ▲4,92720.24 ▼2.94963.74 ▲274.8663.23 ▲5.00
Media Library /wp-admin/upload.php1,400 ▲124.15 ▼0.0395.41 ▼3.5272.09 ▲30.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-add-custom-css/wordpress-add-custom-css.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-add-custom-css/css/custom-css.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wp-add-custom-css/wordpress-add-custom-css.php 92% from 13 tests

The main file in "WP Add Custom CSS" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-add-custom-css.php" instead of "wordpress-add-custom-css.php")

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
Everything looks great! No dangerous files found in this plugin9,741 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,1041,0148,956
CSS45628351
PHP33325297
PO File33146119
SVG10118

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/resize-handle.png0.17KB0.16KB▼ 10.17%
images/icon.png1.18KB0.26KB▼ 78.28%