68% output-desk-live-chat

Code Review | Output Desk Live Chat

WordPress plugin Output Desk Live Chat scored68%from 54 tests.

About plugin

  • Plugin page: output-desk-live-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Feb 12, 2022
  • Number of updates: 8
  • Update frequency: every 281.4 days
  • Top authors: srimax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,468 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.65ms] Passed 4 tests

Server-side resources used by Output Desk Live Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.83 ▼2.53
Dashboard /wp-admin3.34 ▼0.0144.57 ▼19.16
Posts /wp-admin/edit.php3.45 ▲0.0946.43 ▼4.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.52 ▼12.33
Media Library /wp-admin/upload.php3.27 ▲0.0335.34 ▲0.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Output Desk Live Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.24 ▼0.121.85 ▲0.4143.58 ▲0.13
Dashboard /wp-admin2,210 ▲335.56 ▼0.0883.35 ▼2.6672.25 ▲34.38
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.1535.81 ▼6.5332.94 ▼6.88
Add New Post /wp-admin/post-new.php1,692 ▲15422.22 ▼0.88622.28 ▼26.2647.21 ▼17.69
Media Library /wp-admin/upload.php1,418 ▲184.23 ▲0.0892.80 ▼23.0375.07 ▲29.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/output-desk-live-chat/outputdesk.php+61
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/output-desk-live-chat/source.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/output-desk-live-chat/source.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/output-desk-live-chat/source.php on line 4
    • > PHP Notice
      Undefined variable: accountDetails in wp-content/plugins/output-desk-live-chat/source.php on line 3
    • > PHP Warning
      Use of undefined constant ODC_DASHBOARD_LINK - assumed 'ODC_DASHBOARD_LINK' (this will throw an Error in a future version of PHP) in wp-content/plugins/output-desk-live-chat/source.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/output-desk-live-chat/source.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/output-desk-live-chat/definitions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/output-desk-live-chat/definitions.php:6
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/output-desk-live-chat/login.php on line 2
    • > PHP Notice
      Undefined variable: accountDetails in wp-content/plugins/output-desk-live-chat/source.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function display() on null in wp-content/plugins/output-desk-live-chat/login.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (35 tag instead of maximum 10)
You can take inspiration from this readme.txt

output-desk-live-chat/outputdesk.php 92% from 13 tests

The main PHP script in "Output Desk Live Chat" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("output-desk-live-chat.php" instead of "outputdesk.php")

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
No dangerous file extensions were detected271 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9279271

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods832.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.59MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png79.49KB28.00KB▼ 64.78%
assets/screenshot-5.png7.85KB4.08KB▼ 48.00%
assets/icon-256x256.png23.54KB9.36KB▼ 60.26%
assets/banner-1544x500.png259.98KB129.80KB▼ 50.07%
icon.png4.92KB2.64KB▼ 46.28%