78% freshworks-crm

Code Review | Freshworks CRM

WordPress plugin Freshworks CRM scored 78% from 54 tests.

About plugin

  • Plugin page: freshworks-crm
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7.2
  • WordPress version: 5.8.1
  • First release: Jul 15, 2021
  • Latest release: Jul 28, 2021
  • Number of updates: 23
  • Update frequency: every 1.0 days
  • Top authors: joekurian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.84MB] [CPU: ▼187.02ms] Passed 4 tests

Server-side resources used by Freshworks CRM
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼0.935.41 ▼15.94
Dashboard /wp-admin1.80 ▼1.255.55 ▼41.66
Posts /wp-admin/edit.php1.80 ▼1.305.26 ▼41.07
Add New Post /wp-admin/post-new.php1.80 ▼3.636.14 ▼640.79
Media Library /wp-admin/upload.php1.80 ▼1.205.59 ▼24.57
Freshworks CRM /wp-admin/options-general.php?page=freshworks-crm-plugin1.816.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Freshworks CRM
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲20716.43 ▲0.9112.26 ▲0.7146.51 ▼0.74
Dashboard /wp-admin2,977 ▲435.91 ▼0.09144.90 ▼13.40106.46 ▲4.45
Posts /wp-admin/edit.php2,749 ▲102.72 ▼0.0065.40 ▼2.4687.65 ▼1.78
Add New Post /wp-admin/post-new.php1,622 ▲4121.02 ▲4.59317.41 ▼107.85106.97 ▲4.46
Media Library /wp-admin/upload.php1,817 ▲75.03 ▲0.01155.42 ▼7.19109.51 ▼6.83
Freshworks CRM /wp-admin/options-general.php?page=freshworks-crm-plugin1,0702.3275.2382.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the freshwork-crm-track-event handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=freshworks-crm-plugin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the freshwork-crm-track-event handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=freshworks-crm-plugin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the freshwork-crm-configuration-page handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=freshworks-crm-plugin
    • > Notice in wp-content/plugins/freshworks-crm/freshworks-crm-integration.php+121
    Trying to access array offset on value of type bool

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/freshworks-crm/freshworks-crm-integration.php:47

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

freshworks-crm/freshworks-crm-integration.php 92% from 13 tests

Analyzing the main PHP file in "Freshworks CRM" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("freshworks-crm.php" instead of "freshworks-crm-integration.php")

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
Everything looks great! No dangerous files found in this plugin228 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12425104
CSS112295
JavaScript17028
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assests/icon-128x128.png3.89KB2.31KB▼ 40.53%