84% five9

Code Review | Five9 Live Chat

WordPress plugin Five9 Live Chat scored84%from 54 tests.

About plugin

  • Plugin page: five9
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: May 17, 2022
  • Number of updates: 12
  • Update frequency: every 93.9 days
  • Top authors: five9 (41.67%)cklosows (41.67%)sammccallumfive9 (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,314 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
Install script ran successfully

Server metrics [RAM: ▼0.39MB] [CPU: ▼14.06ms] Passed 4 tests

Analyzing server-side resources used by Five9 Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2140.82 ▼1.95
Dashboard /wp-admin3.62 ▲0.3150.02 ▼0.32
Posts /wp-admin/edit.php3.73 ▲0.3752.03 ▼0.82
Add New Post /wp-admin/post-new.php3.49 ▼2.4038.50 ▼53.13
Media Library /wp-admin/upload.php3.54 ▲0.3144.07 ▲7.76
Five9 Chat /wp-admin/options-general.php?page=five93.5139.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Five9 Live Chat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.45 ▼1.318.53 ▲6.5943.02 ▼3.30
Dashboard /wp-admin2,200 ▲205.65 ▲0.1489.23 ▲0.4639.67 ▼3.32
Posts /wp-admin/edit.php2,108 ▲52.08 ▲0.0841.58 ▼4.2637.84 ▲1.18
Add New Post /wp-admin/post-new.php1,686 ▲15821.33 ▼1.88659.39 ▲27.0847.28 ▼1.50
Media Library /wp-admin/upload.php1,402 ▲24.21 ▲0.06103.02 ▼3.9344.13 ▼6.56
Five9 Chat /wp-admin/options-general.php?page=five91,7312.1637.0137.64

Uninstaller [IO: ▲0.00MB] [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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/five9/five9.php:148
    • > PHP Warning
      Use of undefined constant FIVE9_PLUGIN_DIR - assumed 'FIVE9_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/five9/includes/admin/class-admin.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Five9\\add_action() in wp-content/plugins/five9/includes/class-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Five9\\add_action() in wp-content/plugins/five9/includes/class-settings.php:19
    • > PHP Warning
      require_once(FIVE9_PLUGIN_DIRincludes/admin/class-admin-pages.php): failed to open stream: No such file or directory in wp-content/plugins/five9/includes/admin/class-admin.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'FIVE9_PLUGIN_DIRincludes/admin/class-admin-pages.php' (include_path='.:/usr/share/php') in wp-content/plugins/five9/includes/admin/class-admin.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'Five9\\Settings' not found in wp-content/plugins/five9/includes/admin/class-admin-pages.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Five9\\add_action() in wp-content/plugins/five9/includes/class-forms.php:19

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
3 plugin tags: live chat, chat, five9

five9/five9.php 85% from 13 tests

The principal PHP file in "Five9 Live Chat" v. 1.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("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
Everything looks great! No dangerous files found in this plugin1,797 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7210951,457
JavaScript4565268
CSS213272

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity22.71
▷ Minimum class complexity6.00
▷ Maximum class complexity62.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods54
▷ Static methods2240.74%
▷ Public methods3768.52%
▷ Protected methods00.00%
▷ Private methods1731.48%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin