78% unmeteredchat-chat-widget-integration

Code Review | UNMETERED.Chat for WordPress

WordPress plugin UNMETERED.Chat for WordPress scored 78% from 54 tests.

About plugin

  • Plugin page: unmeteredchat-cha...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-4.6.1
  • WordPress version: 5.8.1
  • First release: Sep 6, 2016
  • Latest release: Sep 12, 2016
  • Number of updates: 12
  • Update frequency: every 0.6 days
  • Top authors: nubirdz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.86MB] [CPU: ▼192.44ms] Passed 4 tests

A check of server-side resources used by UNMETERED.Chat for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼0.955.25 ▼20.96
Dashboard /wp-admin1.79 ▼1.275.29 ▼58.75
Posts /wp-admin/edit.php1.79 ▼1.326.23 ▼37.41
Add New Post /wp-admin/post-new.php1.79 ▼3.645.46 ▼638.58
Media Library /wp-admin/upload.php1.79 ▼1.225.87 ▼35.02
Chat Config /wp-admin/admin.php?page=nubirdz_chat_config1.795.23
Chat Help /wp-admin/admin.php?page=nubirdz_chat_help_page1.795.36
Chat Dashboard /wp-admin/admin.php?page=nubirdz_chat_dashboard1.795.87
Compare Chat Plans /wp-admin/admin.php?page=nubirdz_chat_compare1.795.10

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

UNMETERED.Chat for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,747 ▲15115.95 ▼0.039.56 ▼0.4047.59 ▲0.50
Dashboard /wp-admin3,006 ▲755.93 ▼0.09163.53 ▼4.46108.09 ▼1.27
Posts /wp-admin/edit.php2,780 ▲412.71 ▼0.0158.50 ▼5.8182.01 ▼5.65
Add New Post /wp-admin/post-new.php1,528 ▼14418.64 ▼0.19415.01 ▲8.76106.51 ▼7.83
Media Library /wp-admin/upload.php1,851 ▲445.02 ▼0.01156.27 ▲4.88118.91 ▼4.78
Chat Config /wp-admin/admin.php?page=nubirdz_chat_config1,1982.0955.3371.94
Chat Help /wp-admin/admin.php?page=nubirdz_chat_help_page1,1602.2156.5473.05
Chat Dashboard /wp-admin/admin.php?page=nubirdz_chat_dashboard1,0632.3452.1261.70
Compare Chat Plans /wp-admin/admin.php?page=nubirdz_chat_compare2,1982.0956.5673.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jQuery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nubirdz_chat_compare
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jQuery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nubirdz_chat_compare
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'nubirdz_chat_admin_enqueue' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=nubirdz_chat_config
    • > Notice in wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_admin.php+37
    Undefined index: nubirdz_chat_hidden
    • > GET request to /wp-admin/admin.php?page=nubirdz_chat_config
    • > Notice in wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_admin.php+106
    Undefined variable: enCheck
    • > GET request to /wp-admin/admin.php?page=nubirdz_chat_config
    • > Notice in wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_admin.php+110
    Undefined variable: paidCheck

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 items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_admin.php
    • > /wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_dashboard.php
    • > /wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_compare.php
    • > /wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat_help.php
    • > /wp-content/plugins/unmeteredchat-chat-widget-integration/nubirdz_chat.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: calling, chat, call, engine, video...

unmeteredchat-chat-widget-integration/nubirdz_chat.php 92% from 13 tests

This is the main PHP file of "UNMETERED.Chat for WordPress" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("unmeteredchat-chat-widget-integration.php" instead of "nubirdz_chat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected532 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55611532

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.21MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/embed.png73.09KB4.83KB▼ 93.40%
images/unique key.png54.66KB2.46KB▼ 95.51%
images/chat_buttons.png68.68KB5.05KB▼ 92.65%
images/checkmark.png3.00KB0.26KB▼ 91.48%
images/settings.png11.87KB6.34KB▼ 46.56%