79% conversejs

Code Review | ConverseJS

WordPress plugin ConverseJS scored79%from 54 tests.

About plugin

  • Plugin page: conversejs
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Jul 7, 2020
  • Number of updates: 461
  • Update frequency: every 5.1 days
  • Top authors: camaran (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /16,162 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.07MB] [CPU: ▼23.36ms] Passed 4 tests

This is a short check of server-side resources used by ConverseJS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0825.63 ▼14.69
Dashboard /wp-admin3.24 ▼0.1129.92 ▼32.65
Posts /wp-admin/edit.php3.37 ▲0.0233.48 ▼12.19
Add New Post /wp-admin/post-new.php5.61 ▼0.2765.02 ▼33.92
Media Library /wp-admin/upload.php3.32 ▲0.0929.67 ▼2.16
ConverseJS /wp-admin/options-general.php?page=converseJS3.2226.43

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ConverseJS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,299 ▲52821.16 ▲6.9082.48 ▲80.2186.19 ▲42.99
Dashboard /wp-admin2,212 ▲305.77 ▼0.0994.46 ▼26.9143.33 ▼7.41
Posts /wp-admin/edit.php2,098 ▲62.04 ▲0.0141.06 ▲4.6335.62 ▲3.15
Add New Post /wp-admin/post-new.php1,533 ▲1923.17 ▲5.45583.39 ▼75.5850.24 ▼4.70
Media Library /wp-admin/upload.php1,394 ▲64.19 ▼0.09101.97 ▲3.1445.00 ▲2.92
ConverseJS /wp-admin/options-general.php?page=converseJS1,6823.3167.2937.33

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=converseJS
    • > Notice in wp-content/plugins/conversejs/conversejs.php+139
    Trying to access array offset on value of type null

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conversejs/conversejs.php:60

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: chatme, xmpp, irc, motostorie, chat...

conversejs/conversejs.php Passed 13 tests

"ConverseJS" version 4.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
This plugin add the javascript code for Converse.js a Jabber/XMPP chat for your WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin127,901 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript415,52239,399112,851
CSS42,0123710,282
SVG80104,126
PHP26016514
JSON3100128

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/css/images/overlay.png47.50KB34.84KB▼ 26.65%
core/css/images/user.png1.66KB1.08KB▼ 34.90%
core/css/images/bitcoin_qr_code.png4.12KB0.63KB▼ 84.63%