79% wp-css-generator

Code Review | WP CSS Generator

WordPress plugin WP CSS Generator scored79%from 54 tests.

About plugin

  • Plugin page: wp-css-generator
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 14, 2017
  • Latest release: Feb 20, 2017
  • Number of updates: 8
  • Update frequency: every 4.3 days
  • Top authors: goran321 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,214 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.36ms] Passed 4 tests

Analyzing server-side resources used by WP CSS Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.83 ▼4.71
Dashboard /wp-admin3.41 ▲0.1147.13 ▼1.89
Posts /wp-admin/edit.php3.53 ▲0.1849.09 ▲5.74
Add New Post /wp-admin/post-new.php6.01 ▲0.1384.98 ▼6.02
Media Library /wp-admin/upload.php3.34 ▲0.1135.73 ▲3.20
Tools /wp-admin/admin.php?page=wpcssgenerator-tools3.3136.64
CSS Groups /wp-admin/admin.php?page=wpcssgenerator3.35167.67
Add New /wp-admin/admin.php?page=wpcssgenerator-new3.3032.52

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
wpcss-group_children
widget_recent-comments
db_upgraded
wp_css_generator_first_activation
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP CSS Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲13413.57 ▼0.731.67 ▼0.1439.25 ▼3.50
Dashboard /wp-admin2,259 ▲714.97 ▲0.09112.37 ▲2.0582.05 ▲41.54
Posts /wp-admin/edit.php2,148 ▲592.04 ▼0.0039.13 ▲5.1135.41 ▲4.11
Add New Post /wp-admin/post-new.php1,571 ▲2922.88 ▲4.45759.45 ▲155.8752.29 ▲1.62
Media Library /wp-admin/upload.php1,438 ▲504.18 ▼0.13102.51 ▲5.3744.93 ▲1.81
Tools /wp-admin/admin.php?page=wpcssgenerator-tools9231.7125.1323.73
CSS Groups /wp-admin/admin.php?page=wpcssgenerator1,0271.8724.8637.23
Add New /wp-admin/admin.php?page=wpcssgenerator-new1,2851.7529.9132.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • wpcss-group_children
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wp_css_generator_first_activation
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPCSSGenerator\\Part' not found in wp-content/plugins/wp-css-generator/parts/CSS/CSS.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPCSSGenerator\\plugin_dir_path() in wp-content/plugins/wp-css-generator/wp-css-generator.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPCSSGenerator\\is_admin() in wp-content/plugins/wp-css-generator/framework/helpers/class-options.php:1194

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcssgenerator-new
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-css-generator/js/admin_init.js?ver=6.3.1:9:29)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcssgenerator-new
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: css, styles, custom css, custom

wp-css-generator/wp-css-generator.php Passed 13 tests

"WP CSS Generator" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
92 characters long description:
Customize you WP page elements easy and fast. Get full control over any element or property.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin7,934 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS358592,542
PHP129287222,009
JavaScript2100118599
PO File14682113

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity25.10
▷ Minimum class complexity2.00
▷ Maximum class complexity80.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods72
▷ Static methods2027.78%
▷ Public methods6488.89%
▷ Protected methods00.00%
▷ Private methods811.11%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
img/icon.png1.68KB1.03KB▼ 39.13%