72% olark-live-chat

Code Review | WordPress Live Chat Plugin - Olark

WordPress plugin WordPress Live Chat Plugin - Olark scored72%from 54 tests.

About plugin

  • Plugin page: olark-live-chat
  • Plugin version: 1.0.9
  • PHP compatiblity: 4.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: May 25, 2022
  • Number of updates: 28
  • Update frequency: every 65.9 days
  • Top authors: olarkplatform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /36,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.11ms] Passed 4 tests

A check of server-side resources used by WordPress Live Chat Plugin - Olark
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.57 ▼10.22
Dashboard /wp-admin3.38 ▲0.0748.72 ▲0.95
Posts /wp-admin/edit.php3.51 ▲0.1581.16 ▲32.07
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.07 ▲0.11
Media Library /wp-admin/upload.php3.30 ▲0.0735.52 ▲0.71
Olark Settings /wp-admin/options-general.php?page=olark-wp3.3139.84

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Live Chat Plugin - Olark
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.19 ▼1.191.74 ▼0.2140.18 ▼3.96
Dashboard /wp-admin2,217 ▲295.85 ▼0.0396.76 ▼21.8338.42 ▼6.29
Posts /wp-admin/edit.php2,100 ▲112.00 ▼0.0240.38 ▲1.6135.76 ▲3.91
Add New Post /wp-admin/post-new.php1,521 ▲223.67 ▲0.53675.33 ▼8.0150.60 ▲3.93
Media Library /wp-admin/upload.php1,399 ▲144.21 ▼0.0197.11 ▼7.9343.83 ▼0.96
Olark Settings /wp-admin/options-general.php?page=olark-wp9522.0323.1239.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=olark-wp
    • > Notice in wp-content/plugins/olark-live-chat/admin/partials/olark-wp-admin-display.php+37
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/olark-live-chat/public/partials/olark-wp-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/olark-live-chat/admin/partials/olark-wp-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: chat plugin, chatbox, live chat, wordpress live chat, accessible chatbot...

olark-live-chat/olark-wp.php 77% from 13 tests

The entry point to "WordPress Live Chat Plugin - Olark" version 1.0.9 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("olark-live-chat.php" instead of "olark-wp.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 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 detected412 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12156541337
JavaScript343475
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions3
▷ Named functions3100.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
No PNG files were detected