78% getinchat

Code Review | GetInChat Live Chat

WordPress plugin GetInChat Live Chat scored 78% from 54 tests.

About plugin

  • Plugin page: getinchat
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Nov 3, 2017
  • Latest release: Jan 26, 2018
  • Number of updates: 13
  • Update frequency: every 6.5 days
  • Top authors: sstukov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by GetInChat Live Chat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.68 ▼1.67
Dashboard /wp-admin3.35 ▲0.0453.60 ▼3.95
Posts /wp-admin/edit.php3.46 ▲0.1053.49 ▲1.40
Add New Post /wp-admin/post-new.php5.93 ▲0.0399.88 ▲10.49
Media Library /wp-admin/upload.php3.27 ▲0.0447.95 ▲10.99

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GetInChat Live Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▼1013.11 ▼1.591.75 ▼0.4144.20 ▼0.47
Dashboard /wp-admin2,209 ▲35.80 ▼0.11109.40 ▼0.3168.93 ▲24.00
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0238.25 ▼2.4432.76 ▼4.37
Add New Post /wp-admin/post-new.php1,558 ▲1623.78 ▲0.77665.23 ▼210.3868.00 ▲5.29
Media Library /wp-admin/upload.php1,397 ▲154.16 ▲0.00115.17 ▲8.2270.64 ▲24.12

Uninstaller [IO: ✅] [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 were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • gic_setup_step
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/getinchat/getinchat.php
    • > /wp-content/plugins/getinchat/templates/script.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant GIC_SCRIPT_URL - assumed 'GIC_SCRIPT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/getinchat/templates/script.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/getinchat/templates/page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/getinchat/templates/error.php:9
    • > PHP Warning
      Use of undefined constant GIC_PLUGIN_URL - assumed 'GIC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/getinchat/templates/error.php on line 4
    • > PHP Notice
      Undefined variable: channel_id in wp-content/plugins/getinchat/templates/script.php on line 2
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/getinchat/templates/page.php on line 7
    • > PHP Warning
      Use of undefined constant GIC_PLUGIN_URL - assumed 'GIC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/getinchat/templates/page.php on line 4
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/getinchat/templates/error.php on line 7

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 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
Please fix the following attributes:
  • Tags: Too many tags (90 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

getinchat/getinchat.php 92% from 13 tests

The main PHP file in "GetInChat Live Chat" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin350 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46326313
CSS13037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/getinchat-logo-full-512.png6.61KB3.50KB▼ 47.15%
img/getinchat-icon.png1.68KB1.00KB▼ 40.54%
img/getinchat-logo-512.png10.29KB4.62KB▼ 55.14%