10% conversejs-wp

Code Review | ConverseJS for WordPress

WordPress plugin ConverseJS for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: conversejs-wp
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Feb 17, 2014
  • Number of updates: 9
  • Update frequency: every 3.7 days
  • Top authors: mako09 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,237 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'set_defaults' not found or invalid function name

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.99ms] Passed 4 tests

An overview of server-side resources used by ConverseJS for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0126.59 ▼19.47
Dashboard /wp-admin3.39 ▲0.0945.60 ▼2.42
Posts /wp-admin/edit.php3.51 ▲0.1542.17 ▲1.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0979.88 ▼11.21
Media Library /wp-admin/upload.php3.32 ▲0.0937.87 ▲3.10
Converse.js /wp-admin/options-general.php?page=conversejs-wp/conversejs-wp.php3.2637.68

Server storage [IO: ▲1.32MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ConverseJS for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲20415.60 ▲1.3236.87 ▲35.2841.80 ▼2.58
Dashboard /wp-admin2,199 ▲195.51 ▼0.1490.50 ▲3.8945.08 ▲5.04
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0035.37 ▼0.8436.54 ▲0.57
Add New Post /wp-admin/post-new.php1,531 ▲522.16 ▼1.57653.45 ▲36.7177.38 ▲21.84
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.06114.22 ▲9.7554.08 ▲10.90
Converse.js /wp-admin/options-general.php?page=conversejs-wp/conversejs-wp.php9822.0026.6529.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=conversejs-wp/conversejs-wp.php
    • > Notice in wp-content/plugins/conversejs-wp/conversejs-wp.php+339
    Trying to access array offset on value of type bool
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=conversejs-wp/conversejs-wp.php
    • > Notice in wp-content/plugins/conversejs-wp/conversejs-wp.php+315
    Undefined variable: checked
    • > GET request to /wp-admin/options-general.php?page=conversejs-wp/conversejs-wp.php
    • > Deprecated in wp-content/plugins/conversejs-wp/conversejs-wp.php+231
    The each() function is deprecated. This message will be suppressed on further calls

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
Almost there! Just fix the following items
  • 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-wp/conversejs-wp.php:20

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 issues were found

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
5 plugin tags: jabber, chat, xmpp, javascript, converse

conversejs-wp/conversejs-wp.php Passed 13 tests

The main PHP file in "ConverseJS for WordPress" ver. 0.7 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
Jabber/XMPP client Converse.js for WordPress.

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
Success! There were no dangerous files found in this plugin1,530 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS2156291,089
PHP25137293
PO File15153145
JavaScript3723643

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin