68% quick-chat-betterhalf-social-chat

Code Review | Quick chat - BetterHalf Social Chat

WordPress plugin Quick chat - BetterHalf Social Chat scored68%from 54 tests.

About plugin

  • Plugin page: quick-chat-better...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0.1
  • WordPress version: 6.3.1
  • First release: May 8, 2023
  • Latest release: May 8, 2023
  • Number of updates: 5
  • Update frequency: every 56.8 days
  • Top authors: peacefulqode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /115 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.17MB] [CPU: ▼50.73ms] Passed 4 tests

An overview of server-side resources used by Quick chat - BetterHalf Social Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6516.93 ▼27.80
Dashboard /wp-admin2.86 ▼0.4917.77 ▼51.54
Posts /wp-admin/edit.php2.86 ▼0.5020.40 ▼29.22
Add New Post /wp-admin/post-new.php2.86 ▼3.0318.96 ▼94.35
Media Library /wp-admin/upload.php2.86 ▼0.3719.39 ▼18.92

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Quick chat - BetterHalf Social Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.50 ▼1.157.54 ▲5.6541.01 ▼2.28
Dashboard /wp-admin2,218 ▲385.67 ▲0.0090.29 ▲1.5042.91 ▲2.74
Posts /wp-admin/edit.php2,120 ▲172.02 ▼0.0139.89 ▲5.0738.14 ▲2.41
Add New Post /wp-admin/post-new.php1,551 ▲2318.34 ▼4.69645.84 ▼10.8067.24 ▲0.96
Media Library /wp-admin/upload.php1,423 ▲264.27 ▲0.0396.05 ▼11.0444.31 ▼2.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/quick-chat-betterhalf-social-chat/includes/bin/bin.php+19
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/quick-chat-betterhalf-social-chat/public/partials/quick-chat-public-display.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/quick-chat-betterhalf-social-chat/includes/woocommerce/init.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-chat-betterhalf-social-chat/includes/bin/bin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/quick-chat-betterhalf-social-chat/admin/partials/template/style.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/quick-chat-betterhalf-social-chat/admin/partials/quick-chat-admin-display.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/quick-chat-betterhalf-social-chat/admin/partials/template/registered.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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
8 plugin tags: whatsapp, whatsapp business, whatsapp chat, marketinglive, whatsapp support...

quick-chat-betterhalf-social-chat/quick-chat.php 85% from 13 tests

"Quick chat - BetterHalf Social Chat" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("quick-chat-betterhalf-social-chat.php" instead of "quick-chat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected537 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP17146631397
CSS33720125
JavaScript252715

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/whatsapp.png7.64KB3.68KB▼ 51.92%