78% chat-viber

Code Review | Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode

WordPress plugin Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: chat-viber
  • Plugin version: 1.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Nov 16, 2023
  • Number of updates: 25
  • Update frequency: every 14.6 days
  • Top authors: themeatelier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,239 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.98ms] Passed 4 tests

Analyzing server-side resources used by Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3836.88 ▼1.88
Dashboard /wp-admin3.65 ▲0.3451.05 ▲3.16
Posts /wp-admin/edit.php3.70 ▲0.3451.10 ▲7.35
Add New Post /wp-admin/post-new.php5.16 ▼0.7353.54 ▼43.40
Media Library /wp-admin/upload.php3.51 ▲0.2836.58 ▲2.22

Server storage [IO: ▲4.46MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 204 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
vchat-opt
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,076 ▲32915.83 ▲1.4726.33 ▲24.5789.99 ▲45.13
Dashboard /wp-admin2,254 ▲805.47 ▼0.1891.96 ▼6.7942.95 ▼1.25
Posts /wp-admin/edit.php2,160 ▲602.15 ▲0.1440.68 ▲3.7436.05 ▼2.17
Add New Post /wp-admin/post-new.php6,250 ▲4,72426.40 ▲3.28826.52 ▲118.1875.02 ▲13.39
Media Library /wp-admin/upload.php1,459 ▲594.16 ▼0.0297.38 ▼4.9246.25 ▼1.39
Availablity settings /wp-admin/admin.php?page=vchat#tab=availablity-settings4,6004.44101.7860.50
General settings /wp-admin/admin.php?page=vchat#tab=general-settings4,2373.8563.3590.25
Backup /wp-admin/admin.php?page=vchat#tab=backup4,1853.4054.5485.19
Buttons shortcodes /wp-admin/admin.php?page=vchat#tab=buttons-shortcodes4,1843.4856.5779.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • vchat-opt
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/chat-viber/inc/class-enqueue.php
    • > /wp-content/plugins/chat-viber/inc/functions.php
    • > /wp-content/plugins/chat-viber/chat-viber-lite.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant VCHAT_ALERT_MSG - assumed 'VCHAT_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chat-viber/inc/functions.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/chat-viber/view/shortcodes/custom-shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chat-viber/view/single-chat-bubble/single-chat-bubble.php:11
    • > PHP Warning
      Use of undefined constant VCHAT_ALERT_MSG - assumed 'VCHAT_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chat-viber/inc/class-enqueue.php on line 11

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 Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: viber support, support, rakuten chat, viber chat, viber plugin...

chat-viber/chat-viber-lite.php 85% from 13 tests

The principal PHP file in "Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode" v. 1.6.6 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chat-viber.php" instead of "chat-viber-lite.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin45,291 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP893,3481,79514,578
JavaScript91,3896419,450
Sass181,003108,065
CSS94515286,552
PO File203,1983,5916,500
JSON110144
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity24.88
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.12
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes68
▷ Abstract classes22.94%
▷ Concrete classes6697.06%
▷ Final classes11.52%
Methods317
▷ Static methods4413.88%
▷ Public methods29593.06%
▷ Protected methods72.21%
▷ Private methods154.73%
Functions33
▷ Named functions3193.94%
▷ Anonymous functions26.06%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/bubble-8.png6.63KB3.32KB▼ 49.93%
assets/image/bubble-6.png5.64KB2.70KB▼ 52.16%
assets/image/bubble-2.png6.58KB3.15KB▼ 52.05%
assets/image/bubble-7.png5.40KB2.42KB▼ 55.24%
assets/image/bubble-9.png6.34KB2.93KB▼ 53.82%