68% w3s-cf7-zoho

Code Review | W3SCloud Contact Form 7 to Zoho CRM

WordPress plugin W3SCloud Contact Form 7 to Zoho CRM scored68%from 54 tests.

About plugin

  • Plugin page: w3s-cf7-zoho
  • Plugin version: 3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Jul 31, 2019
  • Latest release: Nov 6, 2023
  • Number of updates: 34
  • Update frequency: every 45.9 days
  • Top authors: w3scloud (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,319 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▼0.41ms] Passed 4 tests

Server-side resources used by W3SCloud Contact Form 7 to Zoho CRM
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5138.97 ▼0.66
Dashboard /wp-admin3.81 ▲0.4650.39 ▼11.92
Posts /wp-admin/edit.php3.86 ▲0.5054.36 ▲9.09
Add New Post /wp-admin/post-new.php6.33 ▲0.4496.27 ▲6.36
Media Library /wp-admin/upload.php3.67 ▲0.4435.97 ▲4.60

Server storage [IO: ▲6.39MB] [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: 549 new files
Database: 1 new table, 6 new options
New tables
wp_cf7tozoholog
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for W3SCloud Contact Form 7 to Zoho CRM
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8614.07 ▼0.272.09 ▲0.3639.32 ▼5.31
Dashboard /wp-admin2,213 ▲335.60 ▼0.0092.14 ▼10.9845.17 ▲3.27
Posts /wp-admin/edit.php2,122 ▲191.98 ▲0.0340.68 ▲4.8141.91 ▲8.60
Add New Post /wp-admin/post-new.php1,547 ▲2125.12 ▲1.43610.25 ▼101.0093.46 ▲39.96
Media Library /wp-admin/upload.php1,421 ▲214.17 ▼0.04100.18 ▼9.5643.62 ▼0.30

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
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_cf7tozoholog
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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)
Even though no errors were found, 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 take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/w3s-cf7-zoho/admin/partials/w3s-cf7-zoho-admin-display.php
    • > /wp-content/plugins/w3s-cf7-zoho/includes/admin-menus-for-zoho.php
    • > /wp-content/plugins/w3s-cf7-zoho/public/partials/w3s-cf7-zoho-public-display.php
  • 67× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/w3s-cf7-zoho/includes/zoho-conn/vendor/zohocrm/php-sdk/src/crm/api/handler/TagAPIHandler.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/w3s-cf7-zoho/includes/zoho-conn/vendor/zohocrm/php-sdk/src/crm/api/handler/OrganizationAPIHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Interface 'zcrmsdk\\oauth\\persistence\\ZohoOAuthPersistenceInterface' not found in wp-content/plugins/w3s-cf7-zoho/includes/zoho-conn/vendor/zohocrm/php-sdk/src/oauth/persistence/ZohoOAuthPersistenceHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\response\\CommonAPIResponse' not found in wp-content/plugins/w3s-cf7-zoho/includes/zoho-conn/vendor/zohocrm/php-sdk/src/crm/api/response/APIResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/w3s-cf7-zoho/includes/cmb2-framework/includes/CMB2.php:21

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: contact form 7, zoho crm, crm, w3scloud, leads...

w3s-cf7-zoho/w3s-cf7-zoho.php Passed 13 tests

"W3SCloud Contact Form 7 to Zoho CRM" version 3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Zoho CRM Integration with Contact Form 7. Add Leads from Contact form 7 form entry.

Code Analysis 97% from 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 plugin97,161 lines of code in 459 files:
LanguageFilesBlank linesComment linesLines of code
PHP27712,58531,42755,859
PO File12014,31518,50232,323
CSS251,1671,1524,679
JavaScript113625851,602
Sass16300251,379
Markdown541401,210
JSON400108
SVG1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity33.15
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces17
Interfaces2
Traits0
Classes214
▷ Abstract classes104.67%
▷ Concrete classes20495.33%
▷ Final classes00.00%
Methods3,425
▷ Static methods41112.00%
▷ Public methods2,87183.82%
▷ Protected methods1033.01%
▷ Private methods45113.17%
Functions131
▷ Named functions12897.71%
▷ Anonymous functions32.29%
Constants269
▷ Global constants10237.92%
▷ Class constants16762.08%
▷ Public constants167100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/cmb2-framework/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/cmb2-framework/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/cmb2-framework/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%