78% instant-css

Code Review | Instant CSS

WordPress plugin Instant CSS scored78%from 54 tests.

About plugin

  • Plugin page: instant-css
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Sep 21, 2023
  • Number of updates: 25
  • Update frequency: every 65.6 days
  • Top authors: dylanblokhuis (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /9,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Instant CSS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.76 ▼1.19
Dashboard /wp-admin3.38 ▲0.0847.07 ▼2.35
Posts /wp-admin/edit.php3.49 ▲0.1452.34 ▼2.50
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.98 ▼0.18
Media Library /wp-admin/upload.php3.30 ▲0.0741.56 ▲2.96
Instant CSS /wp-admin/admin.php?page=instantcss3.2735.74
Live editor /wp-admin/admin.php?page=instantcss-customizer3.2732.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 13 new options
New WordPress options
icss_lang
widget_recent-posts
icss_preprocessor
db_upgraded
icss_css
icss_version
icss_postcss
icss_minify
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for Instant CSS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.35 ▲0.082.01 ▲0.1340.49 ▼2.07
Dashboard /wp-admin2,238 ▲645.63 ▲0.1190.06 ▼2.4541.34 ▼7.62
Posts /wp-admin/edit.php2,140 ▲402.00 ▼0.0034.01 ▼2.1834.35 ▼4.18
Add New Post /wp-admin/post-new.php1,550 ▲2423.03 ▼0.15679.36 ▼57.8156.65 ▼1.86
Media Library /wp-admin/upload.php1,440 ▲464.23 ▲0.04114.80 ▲9.9547.49 ▲0.13
Instant CSS /wp-admin/admin.php?page=instantcss1,00614.041,427.9689.54
Live editor /wp-admin/admin.php?page=instantcss-customizer1,35314.231,476.0148.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_recent-comments
    • icss_theme
    • icss_version
    • icss_minify
    • db_upgraded
    • icss_css
    • icss_preprocessor
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/instant-css/classes/class.instantcss.php
    • > /wp-content/plugins/instant-css/instantcss.php
    • > /wp-content/plugins/instant-css/classes/class.instantcss_ajax.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_dashboard_url() in wp-content/plugins/instant-css/views/customizer.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (https://i.imgur.com/RH0C01m.png)
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

instant-css/instantcss.php 92% from 13 tests

The main file in "Instant CSS" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("instant-css.php" instead of "instantcss.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin948 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP69087398
JavaScript8439359
CSS2231149
JSON20042

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.50
▷ Minimum class complexity9.00
▷ Maximum class complexity22.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin