84% css-live-reload

Code Review | Css Live Reload

WordPress plugin Css Live Reload scored84%from 54 tests.

About plugin

  • Plugin page: css-live-reload
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2017
  • Latest release: Dec 28, 2018
  • Number of updates: 7
  • Update frequency: every 80.7 days
  • Top authors: LocalGhost-IL (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /1,618 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.04MB] [CPU: ▼8.22ms] Passed 4 tests

Analyzing server-side resources used by Css Live Reload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.30 ▼1.66
Dashboard /wp-admin3.35 ▲0.0052.17 ▼13.57
Posts /wp-admin/edit.php3.46 ▲0.1150.94 ▼2.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.92 ▼14.67
Media Library /wp-admin/upload.php3.27 ▲0.0442.80 ▲3.04

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Css Live Reload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.60 ▼1.195.60 ▲3.7142.87 ▲2.00
Dashboard /wp-admin2,221 ▲154.88 ▼1.09110.32 ▲3.9744.89 ▲1.04
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0539.35 ▲1.9639.38 ▲3.73
Add New Post /wp-admin/post-new.php1,531 ▼1423.12 ▲0.00664.91 ▼8.6477.62 ▲24.63
Media Library /wp-admin/upload.php1,397 ▲34.32 ▲0.11111.34 ▲13.9646.79 ▼2.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 | 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/css-live-reload/admin/partials/css-live-reload-admin-display.php
    • > /wp-content/plugins/css-live-reload/public/partials/css-live-reload-public-display.php

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)
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Screenshots: Screenshot #1 (Mobile reload by shake the phone screenshot-2.png) image not found
The official readme.txt is a good inspiration

css-live-reload/css-live-reload.php Passed 13 tests

Analyzing the main PHP file in "Css Live Reload" version 1.0.1
82 characters long description:
Reload all CSS files resources on page with one click without refreshing the page.

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 plugin515 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PO File53030198
PHP12119535168
JavaScript33743134
CSS20415

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 1.53MB with 0.97MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png883.00KB305.06KB▼ 65.45%
screenshot-2.png678.75KB256.23KB▼ 62.25%