84% happyfox-chat-for-woocommerce

Code Review | HappyFox Chat - Live Chat Plugin for WooCommerce Online Stores

WordPress plugin HappyFox Chat - Live Chat Plugin for WooCommerce Online Stores scored84%from 54 tests.

About plugin

  • Plugin page: happyfox-chat-for...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2016
  • Latest release: Mar 21, 2019
  • Number of updates: 14
  • Update frequency: every 75.1 days
  • Top authors: hfsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.41ms] Passed 4 tests

This is a short check of server-side resources used by HappyFox Chat - Live Chat Plugin for WooCommerce Online Stores
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.25 ▼2.41
Dashboard /wp-admin3.31 ▲0.0144.33 ▼6.55
Posts /wp-admin/edit.php3.36 ▲0.0148.21 ▲2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.41 ▼14.18
Media Library /wp-admin/upload.php3.24 ▲0.0135.81 ▲1.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for HappyFox Chat - Live Chat Plugin for WooCommerce Online Stores
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.22 ▼0.151.61 ▲0.0139.93 ▼0.93
Dashboard /wp-admin2,213 ▲395.58 ▼0.0383.99 ▼3.8837.92 ▼1.22
Posts /wp-admin/edit.php2,115 ▲181.97 ▼0.0335.07 ▼0.7731.94 ▼2.97
Add New Post /wp-admin/post-new.php1,541 ▲522.83 ▲4.77656.67 ▲56.3554.88 ▼4.50
Media Library /wp-admin/upload.php1,421 ▲184.27 ▼0.10104.03 ▲10.4245.16 ▲2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce-settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce-settings.php:19
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce-settings.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce-cart-info.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce.php:12

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 38 tag instead of maximum 10
The official readme.txt is a good inspiration

happyfox-chat-for-woocommerce/happyfox-chat-for-woocommerce.php Passed 13 tests

"HappyFox Chat - Live Chat Plugin for WooCommerce Online Stores" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
This plugin adds the HappyFox Chat widget to your WooCommerce site

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 detected593 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46923474
CSS1221119

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/woocommerce.png4.50KB2.54KB▼ 43.58%
images/happyfox.png13.64KB3.92KB▼ 71.22%