78% gochat247-live-chat-outsourcing

Code Review | GoChat247 - Live Chat Outsourcing

WordPress plugin GoChat247 - Live Chat Outsourcing scored78%from 54 tests.

About plugin

  • Plugin page: gochat247-live-ch...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: Sep 7, 2017
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: gochat247 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by GoChat247 - Live Chat Outsourcing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0340.98 ▼0.56
Dashboard /wp-admin3.38 ▼0.0151.48 ▼15.71
Posts /wp-admin/edit.php3.43 ▲0.0351.04 ▼2.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0385.79 ▼13.67
Media Library /wp-admin/upload.php3.30 ▲0.0338.35 ▲2.79
Chat Code /wp-admin/options-general.php?page=wcc_config3.2533.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GoChat247 - Live Chat Outsourcing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13113.65 ▼0.949.79 ▲8.1147.07 ▲7.06
Dashboard /wp-admin2,206 ▲325.60 ▼0.0283.03 ▼10.9840.88 ▼1.95
Posts /wp-admin/edit.php2,105 ▲52.00 ▼0.0237.46 ▼0.5034.46 ▼4.30
Add New Post /wp-admin/post-new.php1,535 ▼022.94 ▼0.39692.78 ▲1.4866.99 ▲0.18
Media Library /wp-admin/upload.php1,405 ▲54.20 ▼0.0195.99 ▼3.8241.04 ▼6.38
Chat Code /wp-admin/options-general.php?page=wcc_config8102.0323.2428.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • wcc_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wcc_config
    • > Notice in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php+27
    Undefined index: _wpnonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcc_config
    • > Notice in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php+86
    Undefined index: id
    • > GET request to /wp-admin/options-general.php?page=wcc_config
    • > Notice in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php+86
    Undefined index: class
    • > GET request to /wp-admin/options-general.php?page=wcc_config
    • > Notice in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php+88
    Undefined variable: out

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gochat247-live-chat-outsourcing/modules/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gochat247-live-chat-outsourcing/modules/settings.php:3

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Live Chat software code in plugin)
The official readme.txt is a good inspiration

gochat247-live-chat-outsourcing/gochat247.php 85% from 13 tests

The primary PHP file in "GoChat247 - Live Chat Outsourcing" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gochat247-live-chat-outsourcing.php" instead of "gochat247.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 466 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected12,133 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,08415510,777
JavaScript34973271,194
PHP32616162

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
screenshot-1.PNG92.39KB38.17KB▼ 58.69%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%