83% css-optimizer

Code Review | CSS Minify

WordPress plugin CSS Minify scored83%from 54 tests.

About plugin

  • Plugin page: css-optimizer
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 6.3.1
  • First release: Feb 21, 2017
  • Latest release: Jan 2, 2018
  • Number of updates: 153
  • Update frequency: every 2.0 days
  • Top authors: peterpfeiffer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /16,544 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.60ms] 75% from 4 tests

An overview of server-side resources used by CSS Minify
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 542.67ms on /wp-admin/admin.php?page=ao_partners)
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2251.89 ▲9.31
Dashboard /wp-admin3.57 ▲0.1860.43 ▼10.73
Posts /wp-admin/edit.php3.68 ▲0.2860.44 ▲5.69
Add New Post /wp-admin/post-new.php6.17 ▲0.2494.54 ▼14.65
Media Library /wp-admin/upload.php3.49 ▲0.2250.34 ▲9.62
AO partner /wp-admin/admin.php?page=ao_partners4.58542.67

Server storage [IO: ▲0.41MB] [DB: ▲0.02MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification detected: 4 files (0.99KB) outside of "wp-content/plugins/css-optimizer/" and "wp-content/uploads/"
    • (new file) wp-content/cache/bpminifycss/index.html
    • (new file) wp-content/cache/bpminifycss/.htaccess
    • (new file) wp-content/cache/bpminifycss/js/index.html
    • (new file) wp-content/cache/bpminifycss/css/index.html
Filesystem: 58 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
bpminifycss_version
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by CSS Minify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.85 ▼0.509.74 ▲8.1042.43 ▲0.17
Dashboard /wp-admin2,206 ▲355.65 ▲0.0892.46 ▲1.6537.67 ▼4.77
Posts /wp-admin/edit.php2,111 ▲112.16 ▲0.1241.74 ▲1.8934.30 ▼2.79
Add New Post /wp-admin/post-new.php1,536 ▲1023.34 ▲0.02682.22 ▲11.2055.72 ▲3.27
Media Library /wp-admin/upload.php1,408 ▲84.26 ▲0.05100.89 ▼6.3444.91 ▲1.01
CSS Minify /wp-admin/options-general.php?page=CSS Minify1,1532.3339.6743.63
AO partner /wp-admin/admin.php?page=ao_partners9812.1926.7935.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: bpminifycss_db_version in wp-content/plugins/css-optimizer/classlesses/bpminifycssUpdateCode.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/css-optimizer/classlesses/bpminifycssPartners.php:6

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 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: css, minification, compress, minify css, minify

css-optimizer/bpminifycss.php 69% from 13 tests

"CSS Minify" version 3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("css-optimizer.php" instead of "bpminifycss.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path should be prefixed with a forward slash character ("/localization/")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("localization/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin6,122 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP238491,4374,575
PO File83874861,245
CSS33318225
JavaScript4226676
HTML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity34.95
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes00.00%
Methods185
▷ Static methods137.03%
▷ Public methods7138.38%
▷ Protected methods5931.89%
▷ Private methods5529.73%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants41
▷ Global constants1946.34%
▷ Class constants2253.66%
▷ Public constants22100.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