78% css-crush-for-wordpress

Code Review | CSS Crush for WordPress

WordPress plugin CSS Crush for WordPress scored 78% from 54 tests.

About plugin

  • Plugin page: css-crush-for-wor...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4
  • WordPress version: 5.9.2
  • First release: Jun 27, 2012
  • Latest release: Aug 30, 2012
  • Number of updates: 9
  • Update frequency: every 7.1 days
  • Top authors: codepress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,475 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼427.66ms] Passed 4 tests

An overview of server-side resources used by CSS Crush for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.5662.38 ▲13.27
Dashboard /wp-admin3.43 ▲0.0232.56 ▼1.92
Posts /wp-admin/edit.php3.65 ▲0.0236.04 ▼1.28
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.79 ▼1,708.45
Media Library /wp-admin/upload.php3.31 ▲0.0125.33 ▲1.01
CSS Crush /wp-admin/options-general.php?page=css-crush3.2521.63

Server storage [IO: ▲0.36MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • There were 2 files (2.38KB) illegally modified outside of "wp-content/plugins/css-crush-for-wordpress/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentytwo/style.crush.css
    • (new file) wp-content/themes/twentytwentytwo/.csscrush
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options
cpcc_options

Browser metrics Passed 4 tests

Checking browser requirements for CSS Crush for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.86 ▲0.236.21 ▲0.352.77 ▲0.28
Dashboard /wp-admin2,897 ▲396.07 ▼0.12115.23 ▼18.83150.38 ▼12.77
Posts /wp-admin/edit.php2,693 ▲23.23 ▲0.0062.13 ▼5.36138.73 ▼11.98
Add New Post /wp-admin/post-new.php1,755 ▲12021.25 ▲2.73428.31 ▲0.02154.73 ▲6.47
Media Library /wp-admin/upload.php1,706 ▲85.54 ▲0.11136.96 ▲2.43184.01 ▼2.17
CSS Crush /wp-admin/options-general.php?page=css-crush1,1202.4153.46122.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • cpcc_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=css-crush
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=css-crush
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/css-crush-for-wordpress/css-crush-for-wordpress.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/ie-inline-block.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/ie-opacity.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/ie-min-height.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/hsl-to-hex.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/hocus-pocus.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/spiffing.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/initial.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/rgba-fallback.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'csscrush_hook' not found in wp-content/plugins/css-crush-for-wordpress/crush/plugins/ie-filter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Settings page)
The official readme.txt is a good inspiration

css-crush-for-wordpress/css-crush-for-wordpress.php Passed 13 tests

The main PHP file in "CSS Crush for WordPress" ver. 0.3 adds more information about the plugin and also serves as the entry point for this plugin
124 characters long description:
Integrates an extensible CSS preprocessor for WordPress: upload, activate, and you're done. No further configuration needed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,783 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,2419583,178
INI45467459
PO File2182081
JSON10024
CSS2141222
Markdown116019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.00
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods152
▷ Static methods10166.45%
▷ Public methods12682.89%
▷ Protected methods2516.45%
▷ Private methods10.66%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png151.63KB54.26KB▼ 64.21%
screenshot-1.png34.17KB14.58KB▼ 57.34%
assets/images/icon.png2.46KB1.87KB▼ 24.25%