89% livepreview

Code Review | LivePreview Digital Product Demo Bar for WordPress

WordPress plugin LivePreview Digital Product Demo Bar for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: livepreview
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2019
  • Latest release: Oct 29, 2020
  • Number of updates: 36
  • Update frequency: every 16.6 days
  • Top authors: avirtum (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /2,793 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.57ms] Passed 4 tests

A check of server-side resources used by LivePreview Digital Product Demo Bar for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0646.27 ▼0.63
Dashboard /wp-admin3.37 ▲0.0658.77 ▲6.23
Posts /wp-admin/edit.php3.42 ▲0.0647.82 ▼6.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.45 ▼9.89
Media Library /wp-admin/upload.php3.29 ▲0.0636.47 ▲2.53

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

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/livepreview/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

LivePreview Digital Product Demo Bar for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.31 ▼1.091.70 ▼0.1943.24 ▲1.79
Dashboard /wp-admin2,237 ▲314.85 ▼0.19110.72 ▲3.4844.50 ▼1.32
Posts /wp-admin/edit.php2,095 ▼82.02 ▼0.0335.62 ▼10.5134.05 ▼4.55
Add New Post /wp-admin/post-new.php1,539 ▼317.46 ▼0.87655.03 ▲21.2261.04 ▲1.40
Media Library /wp-admin/upload.php1,413 ▲104.26 ▲0.01106.06 ▲1.7045.16 ▼2.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in livepreview/assets to your readme.txt
The official readme.txt might help

livepreview/livepreview.php 92% from 13 tests

The entry point to "LivePreview Digital Product Demo Bar for WordPress" version 1.2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 195 characters long)

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
No dangerous file extensions were detected3,476 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP89491790
JavaScript7098
CSS70337

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/devices-dark.png0.34KB0.20KB▼ 41.93%
assets/images/logo.png1.10KB0.85KB▼ 22.51%
assets/images/devices.png0.32KB0.20KB▼ 36.53%
assets/images/bg.png0.12KB0.10KB▼ 14.17%