84% connector-for-woocommerce-and-zoho-crm

Code Review | Connector for WooCommerce and Zoho CRM

WordPress plugin Connector for WooCommerce and Zoho CRM scored84%from 54 tests.

About plugin

  • Plugin page: connector-for-woo...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Dec 17, 2022
  • Number of updates: 31
  • Update frequency: every 80.8 days
  • Top authors: hearken (90.32%)aspengrovestudios (9.68%)annaqq (6.45%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /6,440 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.06ms] Passed 4 tests

This is a short check of server-side resources used by Connector for WooCommerce and Zoho CRM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.50 ▲4.70
Dashboard /wp-admin3.31 ▼0.0343.74 ▼19.45
Posts /wp-admin/edit.php3.36 ▲0.0147.07 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.75 ▲0.21
Media Library /wp-admin/upload.php3.23 ▲0.0133.60 ▼1.98

Server storage [IO: ▲0.99MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Connector for WooCommerce and Zoho CRM
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.20 ▼1.112.04 ▲0.2244.26 ▼0.63
Dashboard /wp-admin2,206 ▲545.91 ▲0.34106.52 ▼7.1939.92 ▼1.00
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0340.03 ▲3.4734.10 ▼2.53
Add New Post /wp-admin/post-new.php1,536 ▼623.37 ▲5.18649.34 ▲6.1049.67 ▼8.28
Media Library /wp-admin/upload.php1,382 ▼64.37 ▲0.1596.28 ▲2.1141.50 ▼1.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 32× 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/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/crm/bulkapi/handler/BulkReadAPIHandler.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/module.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/organization.php on line 4
    • > PHP Warning
      require_once(wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/customeview.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/crm/api/handler/MassEntityAPIHandler.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/crm/bulkapi/handler/BulkWriteAPIHandler.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/crm/api/handler/OrganizationAPIHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'zcrmsdk\\oauth\\persistence\\ZohoOAuthPersistenceInterface' not found in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/oauth/persistence/ZohoOAuthPersistenceByFile.php:10
    • > PHP Warning
      require_once(wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/samplecodes/record.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'zcrmsdk\\crm\\api\\handler\\APIHandler' not found in wp-content/plugins/connector-for-woocommerce-and-zoho-crm/vendor/zohocrm/php-sdk/src/crm/api/handler/VariableAPIHandler.php:11

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: zoho, integration, e-commerce, zoho crm, crm...

connector-for-woocommerce-and-zoho-crm/connector-for-woocommerce-and-zoho-crm.php Passed 13 tests

The main file in "Connector for WooCommerce and Zoho CRM" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
Automatically add WooCommerce customers as contacts and/or leads in Zoho CRM.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin17,564 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP1032,9038,17417,243
Markdown1990249
JSON30072

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity15.75
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces17
Interfaces2
Traits0
Classes95
▷ Abstract classes00.00%
▷ Concrete classes95100.00%
▷ Final classes00.00%
Methods1,689
▷ Static methods1327.82%
▷ Public methods1,60194.79%
▷ Protected methods00.00%
▷ Private methods885.21%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants129
▷ Global constants00.00%
▷ Class constants129100.00%
▷ Public constants129100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/potent-logo.png7.60KB5.27KB▼ 30.74%