84% css-addons

Code Review | Custom CSS Addons

WordPress plugin Custom CSS Addons scored84%from 54 tests.

About plugin

  • Plugin page: css-addons
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Mar 28, 2023
  • Number of updates: 55
  • Update frequency: every 53.9 days
  • Top authors: bastho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by Custom CSS Addons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.39 ▼2.47
Dashboard /wp-admin3.35 ▲0.0054.73 ▼15.91
Posts /wp-admin/edit.php3.40 ▲0.0455.72 ▲3.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.64 ▼10.90
Media Library /wp-admin/upload.php3.27 ▲0.0445.37 ▲6.39
CSS addons /wp-admin/options-general.php?page=css_addons_available_manage3.2440.30

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

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

Browser metrics Passed 4 tests

Custom CSS Addons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲6913.17 ▼1.511.54 ▼0.1538.07 ▼10.18
Dashboard /wp-admin2,225 ▲224.84 ▼0.08104.92 ▼9.3038.00 ▼0.96
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0443.00 ▲4.7236.76 ▲1.62
Add New Post /wp-admin/post-new.php1,556 ▲1223.06 ▲0.36619.65 ▼10.1465.01 ▲7.71
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.11113.64 ▼15.8247.59 ▼5.09
CSS addons /wp-admin/options-general.php?page=css_addons_available_manage9802.1034.7929.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/css-addons/css.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/css-addons/css.php on line 15
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/css-addons/css.php on line 15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

css-addons/css.php 92% from 13 tests

The principal PHP file in "Custom CSS Addons" v. 1.9.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("css-addons.php" instead of "css.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,917 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript119659978,688
PHP14577402
CSS115846349
SVG100282
HTML180144
PO File119747748
YAML1004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
7 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png2.59KB1.65KB▼ 36.46%
assets/screenshot-3.png17.98KB7.30KB▼ 59.39%
assets/icon-256x256.png4.62KB2.61KB▼ 43.48%
assets/screenshot-1.png32.01KB12.85KB▼ 59.86%
assets/banner-1544x500.png53.36KB18.45KB▼ 65.42%