83% livechat-for-easy-digital-downloads

Code Review | LiveChat for Easy Digital Downloads

WordPress plugin LiveChat for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: livechat-for-easy...
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2018
  • Latest release: Sep 10, 2019
  • Number of updates: 65
  • Update frequency: every 9.0 days
  • Top authors: livechat (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.91ms] Passed 4 tests

An overview of server-side resources used by LiveChat for Easy Digital Downloads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.29 ▼6.96
Dashboard /wp-admin3.31 ▲0.0047.14 ▼7.37
Posts /wp-admin/edit.php3.36 ▲0.0048.49 ▼4.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.90 ▼9.16
Media Library /wp-admin/upload.php3.23 ▲0.0039.67 ▲3.62

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LiveChat for Easy Digital Downloads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.58 ▲0.301.77 ▼0.0537.99 ▼6.97
Dashboard /wp-admin2,192 ▲155.52 ▼0.0183.87 ▼4.3938.43 ▼2.42
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0334.96 ▼6.6638.79 ▲0.26
Add New Post /wp-admin/post-new.php1,526 ▼223.66 ▲0.53646.82 ▲39.5363.02 ▲0.38
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.09102.92 ▼8.5541.36 ▼5.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/livechat-for-easy-digital-downloads/livechat-easydigitaldownloads.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need to be fixed: Please take inspiration from this readme.txt

livechat-for-easy-digital-downloads/livechat-easydigitaldownloads.php 85% from 13 tests

The main file in "LiveChat for Easy Digital Downloads" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("livechat-for-easy-digital-downloads.php" instead of "livechat-easydigitaldownloads.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,601 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1016019974
CSS2778331
JavaScript260295
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.78
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes112.50%
Methods43
▷ Static methods00.00%
▷ Public methods2762.79%
▷ Protected methods1330.23%
▷ Private methods36.98%
Functions0
▷ Named functions00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.79MB with 0.39MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/media/lc-plus-edd.png17.23KB6.60KB▼ 61.70%
includes/media/lc-app.png666.92KB200.06KB▼ 70.00%
includes/media/livechat-devices.png94.69KB100.99KB0.00%
includes/media/lc-plus-edd@2x.png34.41KB12.99KB▼ 62.25%