84% prixchat

Code Review | PrixChat - Realtime Private & Group Chat Plugin

WordPress plugin PrixChat - Realtime Private & Group Chat Plugin scored84%from 54 tests.

About plugin

  • Plugin page: prixchat
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 20, 2022
  • Latest release: Oct 4, 2022
  • Number of updates: 4
  • Update frequency: every 4.5 days
  • Top authors: tanng (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /798 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.95ms] Passed 4 tests

This is a short check of server-side resources used by PrixChat - Realtime Private & Group Chat Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.29 ▼1.36
Dashboard /wp-admin3.34 ▲0.0343.14 ▼3.20
Posts /wp-admin/edit.php3.45 ▲0.0946.50 ▼1.36
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.10 ▼17.88
Media Library /wp-admin/upload.php3.26 ▲0.0334.66 ▲2.66
PrixChat /wp-admin/admin.php?page=prixchat3.2334.38
Settings /wp-admin/admin.php?page=prixchat-settings3.2732.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: 3 new tables, 7 new options
New tables
wp_prixchat_messages
wp_prixchat_conversations
wp_prixchat_peers
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
prixchat_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for PrixChat - Realtime Private & Group Chat Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.21 ▼1.081.57 ▼0.1641.70 ▲2.59
Dashboard /wp-admin2,229 ▲414.84 ▼1.07107.62 ▲3.7241.89 ▼0.06
Posts /wp-admin/edit.php2,112 ▲202.05 ▲0.0341.39 ▲5.9936.09 ▲0.12
Add New Post /wp-admin/post-new.php1,562 ▲4818.27 ▲0.70617.02 ▼59.7856.18 ▲4.52
Media Library /wp-admin/upload.php1,408 ▲264.23 ▲0.0597.77 ▲0.0340.75 ▼3.33
PrixChat /wp-admin/admin.php?page=prixchat8384.1281.8022.04
Settings /wp-admin/admin.php?page=prixchat-settings9062.0625.1636.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PrixChat\\Controllers\\Base_Controller' not found in wp-content/plugins/prixchat/src/controllers/class-peers-controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/prixchat/src/controllers/class-base-controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PrixChat\\Controllers\\Base_Controller' not found in wp-content/plugins/prixchat/src/controllers/class-conversations-controller.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/prixchat/prixchat.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PrixChat\\Controllers\\Base_Controller' not found in wp-content/plugins/prixchat/src/controllers/class-sse-controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PrixChat\\Controllers\\Base_Controller' not found in wp-content/plugins/prixchat/src/controllers/class-messages-controller.php:9

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2 in prixchat/assets to your readme.txt
You can look at the official readme.txt

prixchat/prixchat.php Passed 13 tests

The main file in "PrixChat - Realtime Private & Group Chat Plugin" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
Self-hosted realtime group chat and private chat without any third party service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,806 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP18417921,436
JavaScript13442354
HTML11014
CSS1001
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.71
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods63
▷ Static methods2031.75%
▷ Public methods5790.48%
▷ Protected methods00.00%
▷ Private methods69.52%
Functions12
▷ Named functions433.33%
▷ Anonymous functions866.67%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin