94% happyfox-chat

Code Review | HappyFox Chat - Live Chat Plugin for Wordpress Websites

WordPress plugin HappyFox Chat - Live Chat Plugin for Wordpress Websites scored 94% from 54 tests.

About plugin

  • Plugin page: happyfox-chat
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.1
  • WordPress version: 5.8.1
  • First release: Aug 4, 2015
  • Latest release: May 19, 2020
  • Number of updates: 47
  • Update frequency: every 37.2 days
  • Top authors: hfsupport (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 10,179 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by HappyFox Chat - Live Chat Plugin for Wordpress Websites
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.16 ▲14.40
Dashboard /wp-admin3.07 ▲0.0244.92 ▲7.45
Posts /wp-admin/edit.php3.13 ▲0.0247.44 ▲1.91
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.51 ▼558.49
Media Library /wp-admin/upload.php3.02 ▲0.0230.58 ▼2.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for HappyFox Chat - Live Chat Plugin for Wordpress Websites
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲10515.87 ▲0.038.03 ▼0.2847.99 ▼0.73
Dashboard /wp-admin2,992 ▲615.89 ▼0.03135.07 ▼9.03116.41 ▼1.68
Posts /wp-admin/edit.php2,761 ▲222.70 ▼0.0166.28 ▼0.1394.65 ▲2.07
Add New Post /wp-admin/post-new.php1,513 ▼15918.81 ▼0.30374.42 ▼25.02113.95 ▲1.88
Media Library /wp-admin/upload.php1,829 ▲195.01 ▲0.01152.17 ▼11.07123.24 ▲10.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > 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/happyfox-chat-settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happyfox-chat/happyfox-chat.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/happyfox-chat/happyfox-chat-settings.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main PHP file in "HappyFox Chat - Live Chat Plugin for Wordpress Websites" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
64 characters long description:
This plugin adds the HappyFox Chat widget to your WordPress blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected191 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants7100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/happyfox.png13.64KB3.92KB▼ 71.22%