84% livechat-lazucrub

Code Review | LiveChat LazucruB

WordPress plugin LiveChat LazucruB scored84%from 54 tests.

About plugin

  • Plugin page: livechat-lazucrub
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Nov 4, 2020
  • Latest release: Dec 5, 2020
  • Number of updates: 36
  • Update frequency: every 8.5 days
  • Top authors: cheater111 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by LiveChat LazucruB
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.43 ▼4.27
Dashboard /wp-admin3.30 ▲0.0053.13 ▲4.47
Posts /wp-admin/edit.php3.37 ▲0.0249.44 ▲0.16
Add New Post /wp-admin/post-new.php5.88 ▼0.0186.97 ▼26.24
Media Library /wp-admin/upload.php3.22 ▼0.0136.06 ▲3.90
LiveChat LazucruB /wp-admin/options-general.php?page=realtimewp_settings_page3.1933.39

Server storage [IO: ▲3.31MB] [DB: ▼0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for LiveChat LazucruB
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.101.64 ▼0.5942.53 ▼4.24
Dashboard /wp-admin2,213 ▲284.85 ▼1.0098.96 ▼8.3140.67 ▼1.03
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0435.16 ▼5.7933.44 ▼4.45
Add New Post /wp-admin/post-new.php1,517 ▼1617.55 ▼5.78666.03 ▲63.7561.57 ▲13.02
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0796.38 ▼0.3140.76 ▼1.10
LiveChat LazucruB /wp-admin/options-general.php?page=realtimewp_settings_page8092.1522.8424.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/livechat-lazucrub/template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/livechat-lazucrub/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_cookie_constants() in wp-content/plugins/livechat-lazucrub/livechat-lazucrub.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: online, chat, websocket, real time

livechat-lazucrub/livechat-lazucrub.php Passed 13 tests

"LiveChat LazucruB" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
25 characters long description:
chat client for wordpress

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
There were no executable files found in this plugin5,161 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51891364,664
CSS2421209
PHP3188201
CoffeeScript19687

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.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
9 PNG files occupy 3.12MB with 1.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/img/IconsetW.png25.86KB10.97KB▼ 57.59%
lib/img/IconsetSmiles.png6.81KB5.57KB▼ 18.18%
lib/img/emoji_spritesheet_3.png402.21KB109.53KB▼ 72.77%
lib/img/emoji_spritesheet_1.png530.83KB127.64KB▼ 75.95%
lib/img/IconsetW_1x.png12.66KB5.92KB▼ 53.21%