10% incognito-chat

Code Review | Incognito Chat - Free Live Chat Plugin (chat roulette)

WordPress plugin Incognito Chat - Free Live Chat Plugin (chat roulette) scored10%from 54 tests.

About plugin

  • Plugin page: incognito-chat
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Jun 7, 2015
  • Number of updates: 19
  • Update frequency: every 18.9 days
  • Top authors: yuriyant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,678 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/incognito-chat/admin/settings.php+58
    Non-static method INCTCHATWIDGET_Settings::_getDefaultOptions() should not be called statically

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.32ms] Passed 4 tests

This is a short check of server-side resources used by Incognito Chat - Free Live Chat Plugin (chat roulette)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1546.28 ▲7.47
Dashboard /wp-admin3.44 ▲0.0947.33 ▼16.51
Posts /wp-admin/edit.php3.55 ▲0.1946.96 ▼5.80
Add New Post /wp-admin/post-new.php6.04 ▲0.1583.30 ▼14.44
Media Library /wp-admin/upload.php3.36 ▲0.1337.04 ▼0.53
Incognito chat widget /wp-admin/options-general.php?page=incognito-chat-widget-options3.3531.63

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
inctchatWidgetOptions
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Incognito Chat - Free Live Chat Plugin (chat roulette)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.28 ▼1.312.59 ▲1.0145.89 ▲4.26
Dashboard /wp-admin2,218 ▲444.88 ▼0.6987.40 ▼1.4038.00 ▼2.18
Posts /wp-admin/edit.php2,104 ▲42.31 ▲0.3234.49 ▼1.2432.12 ▼4.50
Add New Post /wp-admin/post-new.php1,559 ▲3123.38 ▲0.20597.61 ▼28.5733.38 ▼35.57
Media Library /wp-admin/upload.php1,424 ▲244.41 ▲0.2587.99 ▼10.2740.23 ▼2.84
Incognito chat widget /wp-admin/options-general.php?page=incognito-chat-widget-options1,5132.5341.3875.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/incognito-chat/admin/settings/form/list-pictures.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/incognito-chat/incognito-chat-widget.php:14
    • > PHP Warning
      scandir(INCTCHATWIDGET_DIRpublic/assets/img/widgets/): failed to open dir: No such file or directory in wp-content/plugins/incognito-chat/admin/settings/form/list-pictures.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/incognito-chat/admin/settings/widget/index.php:9
    • > PHP Notice
      Trying to get property 'mobileDetecthelper' of non-object in wp-content/plugins/incognito-chat/public/includes/view/fast-api/init.php on line 3
    • > PHP Warning
      Use of undefined constant INCTCHATWIDGET_DIR - assumed 'INCTCHATWIDGET_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/incognito-chat/admin/settings/form/list-pictures.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/incognito-chat/public/includes/wp-actions/init-js-api.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/incognito-chat/public/includes/helpers/main.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/incognito-chat/admin/settings/form/index.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function isMobile() on null in wp-content/plugins/incognito-chat/public/includes/view/fast-api/init.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/incognito-chat/admin/settings/form/list-pictures.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Main chat window), #2 (Universal design), #3 (Chat widget (page settings)), #4 (Compatible with mobile devices)
You can look at the official readme.txt

incognito-chat/incognito-chat-widget.php 92% from 13 tests

This is the main PHP file of "Incognito Chat - Free Live Chat Plugin (chat roulette)" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("incognito-chat.php" instead of "incognito-chat-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin891 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11152512764
CSS130112
JavaScript11015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.80
Average class complexity25.40
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1124.44%
▷ Public methods4191.11%
▷ Protected methods00.00%
▷ Private methods48.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
30 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/widgets/12.png7.64KB4.32KB▼ 43.52%
public/assets/img/widgets/2.png25.35KB9.51KB▼ 62.50%
public/assets/img/widgets/16.png4.63KB2.59KB▼ 44.04%
public/assets/img/widgets/14.png6.65KB3.00KB▼ 54.93%
public/assets/img/widgets/20.png5.53KB2.84KB▼ 48.60%