82% lms-chat

Code Review | Learning Management System (LMS) Chat Application

WordPress plugin Learning Management System (LMS) Chat Application scored82%from 54 tests.

About plugin

  • Plugin page: lms-chat
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Jun 5, 2023
  • Number of updates: 23
  • Update frequency: every 21.6 days
  • Top authors: ronymaha (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /5,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Learning Management System (LMS) Chat Application
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.20 ▼0.99
Dashboard /wp-admin3.31 ▲0.0153.56 ▲1.12
Posts /wp-admin/edit.php3.43 ▲0.0749.69 ▲1.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.15 ▼7.91
Media Library /wp-admin/upload.php3.24 ▲0.0136.10 ▲1.55

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Learning Management System (LMS) Chat Application
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.24 ▼1.351.88 ▲0.1143.51 ▼6.43
Dashboard /wp-admin2,224 ▲365.81 ▲0.02104.49 ▼12.4739.50 ▼7.51
Posts /wp-admin/edit.php2,113 ▲242.01 ▲0.0241.18 ▲4.2435.15 ▼0.88
Add New Post /wp-admin/post-new.php1,558 ▲3823.05 ▼0.01684.13 ▲1.0258.61 ▲6.63
Media Library /wp-admin/upload.php1,415 ▲244.21 ▼0.0895.28 ▼4.0742.51 ▲0.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lms-chat/view/backend-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lms-chat/wp-lms-conversition.php:22

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #3 (Set sound notification if you needed.), #4 (Set google firebase settings for store chat history and for realtime conversation.)
  • Screenshots: Please add descriptions for these screenshots #0, #0 in lms-chat/assets to your readme.txt
  • Tags: You are using too many tags: 21 tag instead of maximum 10
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

lms-chat/wp-lms-conversition.php 77% from 13 tests

"Learning Management System (LMS) Chat Application" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("lms-chat.php" instead of "wp-lms-conversition.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 266 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,184 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35068021,953
PHP6187432610
SVG2203581
PO File1131330
CSS29010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.25
▷ Minimum class complexity4.00
▷ Maximum class complexity49.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/disconnected.png0.64KB0.90KB0.00%
assets/images/banner-772x250.png149.32KB56.63KB▼ 62.07%
assets/images/connected.png0.46KB0.59KB0.00%