10% zoho-crm-forms

Code Review | Zoho CRM Lead Magnet

WordPress plugin Zoho CRM Lead Magnet scored10%from 54 tests.

About plugin

  • Plugin page: zoho-crm-forms
  • Plugin version: 1.7.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2017
  • Latest release: Sep 27, 2023
  • Number of updates: 216
  • Update frequency: every 9.8 days
  • Top authors: zohocrm (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

4,000+ active /157,173 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformshelper.php+52
    Undefined variable: firstplugin

Server metrics [RAM: ▲0.64MB] [CPU: ▲5.04ms] Passed 4 tests

This is a short check of server-side resources used by Zoho CRM Lead Magnet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5550.20 ▲3.64
Dashboard /wp-admin4.02 ▲0.7162.23 ▲5.45
Posts /wp-admin/edit.php4.07 ▲0.7158.40 ▲10.38
Add New Post /wp-admin/post-new.php6.54 ▲0.6597.75 ▲0.67
Media Library /wp-admin/upload.php3.88 ▲0.6556.31 ▲20.41
Logs1 /wp-admin/admin.php?page=crm-authentications3.9145.37
Logs /wp-admin/admin.php?page=formsubmit-logs3.8546.81
/wp-admin/admin.php?page=create-leadform-builder3.9849.34
CRM Forms /wp-admin/admin.php?page=crmforms-builder3.9644.64
/wp-admin/admin.php?page=create-thirdpartyform-builder3.9048.92
Forms Settings /wp-admin/admin.php?page=formsettings-builder3.8747.45

Server storage [IO: ▲3.26MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/zoho-crm-forms/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 63 new files
Database: 7 new tables, 15 new options
New tables
zcf_zohocrm_list_module
zcf_submitlogs
zcf_zohoshortcode_manager
zcf_contactformrelation
zcf_zohocrmform_field_manager
zcf_zohocrm_assignmentrule
zcf_zohocrm_formfield_manager
New WordPress options
custom_plugin
zcf_usersync_assignedto_settings
ZCFFormBuilderPluginActivated
ZcfFromBuilderFirstTimeWarning
widget_theysaidso_widget
zcf-zohocrm-form-builder
can_compress_scripts
theysaidso_admin_options
Sync_value_on_off
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zoho CRM Lead Magnet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.71 ▼0.668.30 ▲6.5641.72 ▼3.31
Dashboard /wp-admin2,236 ▲306.01 ▲1.14105.38 ▼3.8277.94 ▲29.59
Posts /wp-admin/edit.php2,130 ▲302.01 ▲0.0433.49 ▼3.2134.59 ▼0.37
Add New Post /wp-admin/post-new.php1,560 ▲2322.90 ▼0.26695.28 ▲21.7266.49 ▲15.57
Media Library /wp-admin/upload.php1,424 ▲244.26 ▲0.05108.50 ▲0.0447.93 ▲2.63
Logs1 /wp-admin/admin.php?page=crm-authentications1,0942.4643.5639.58
Logs /wp-admin/admin.php?page=formsubmit-logs8772.1740.8322.57
/wp-admin/admin.php?page=create-leadform-builder6,0672.7039.0027.36
CRM Forms /wp-admin/admin.php?page=crmforms-builder1,3182.5337.7229.57
/wp-admin/admin.php?page=create-thirdpartyform-builder1,0662.0927.0938.45
Forms Settings /wp-admin/admin.php?page=formsettings-builder1,0332.4638.4928.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformshelper.php+64
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 7 tables
    • zcf_zohocrm_list_module
    • zcf_contactformrelation
    • zcf_zohocrm_formfield_manager
    • zcf_zohocrmform_field_manager
    • zcf_submitlogs
    • zcf_zohocrm_assignmentrule
    • zcf_zohoshortcode_manager
  • Zombie WordPress options were found after uninstall: 14 options
    • theysaidso_admin_options
    • custom_plugin
    • widget_recent-posts
    • ZCFFormBuilderPluginActivated
    • zohocrmbasemodule
    • Sync_value_on_off
    • zcf_user_capture_settings
    • db_upgraded
    • widget_recent-comments
    • zcf-zohocrm-form-builder
    • ...

Smoke tests 75% 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)
These errors were triggered by the plugin
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=formsettings-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmsettingstab.php+135
    Trying to access array offset on value of type bool
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+456
    Undefined index: EditShortcode
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+209
    Undefined index: module
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmshortcodefunctions.php+348
    Undefined index: onAction
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfieldsfuntions.php+24
    Undefined index: crmtype
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+80
    Undefined variable: LayoutName
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+120
    Undefined index: formName
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+157
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+125
    Trying to get property 'form_name' of non-object
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+153
    Undefined index: LayoutName
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+459
    Trying to get property 'shortcode_id' of non-object
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+248
    Undefined variable: config_fields
    • > GET request to /wp-admin/admin.php?page=create-leadform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmwebformfields.php+248
    Trying to get property 'assignmentrule_enable' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+152
    Undefined index: third_module
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+8
    Undefined index: form_title
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+155
    Undefined index: layoutname
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+10
    Undefined index: third_plugin
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+36
    Trying to get property 'post_content' of non-object
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+83
    Undefined index: third_module_pluginname
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+105
    Undefined variable: contact_form_labels
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Warning in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+105
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=create-thirdpartyform-builder
    • > Notice in wp-content/plugins/zoho-crm-forms/includes/crmcontactformfields.php+157
    Trying to get property 'layoutID' of non-object

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Integrating Zoho CRM with Wordpress), #2 (Zoho CRM Forms), #3 (Creating a new form using Zoho CRM), #4 (Mapping fields with Zoho CRM), #5 (Configuring Contact Form 7), #6 (Mapping fields with Contact Form 7), #7 (Embedding the form created into a page/post.)
Please take inspiration from this readme.txt

zoho-crm-forms/index.php 85% from 13 tests

The main file in "Zoho CRM Lead Magnet" v. 1.7.8.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 509 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("zoho-crm-forms.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected24,248 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,5565588,460
CSS95402256,272
PHP24846495,863
SVG2223,653

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity24.25
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods135
▷ Static methods4331.85%
▷ Public methods135100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
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
10 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/images/arrow.png0.44KB0.28KB▼ 36.59%
assets/images/zohocrmicon.png18.36KB0.64KB▼ 96.50%
assets/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%