10% woo-zoho-crm

Code Review | WooCommerce Zoho CRM Integration

WordPress plugin WooCommerce Zoho CRM Integration scored10%from 54 tests.

About plugin

  • Plugin page: woo-zoho-crm
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Mar 1, 2019
  • Latest release: Nov 27, 2019
  • Number of updates: 14
  • Update frequency: every 19.4 days
  • Top authors: infomagesture (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /2,037 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/woo-zoho-crm/api/events.php+9
    Trying to get property 'contact_sync' of non-object

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.44ms] Passed 4 tests

A check of server-side resources used by WooCommerce Zoho CRM Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1640.11 ▲0.93
Dashboard /wp-admin3.47 ▲0.1248.64 ▼7.83
Posts /wp-admin/edit.php3.58 ▲0.2348.28 ▲9.78
Add New Post /wp-admin/post-new.php6.05 ▲0.1682.21 ▼12.62
Media Library /wp-admin/upload.php3.39 ▲0.1644.80 ▲10.71
Products Manual Sync /wp-admin/admin.php?page=zoho-product-queue3.3837.08
Orders Manual Sync /wp-admin/admin.php?page=zoho-order-queue3.3834.94
Zoho Report /wp-admin/admin.php?page=zoho-report3.3930.32
Zoho CRM /wp-admin/admin.php?page=wczc-menu3.4234.38
Upgrade Pro /wp-admin/admin.php?page=upgrade-pro3.3732.76
Support /wp-admin/admin.php?page=support3.3632.83
Customers Manual Sync /wp-admin/admin.php?page=zoho-queue3.3932.05

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: 3 new tables, 8 new options
New tables
wp_woo_zoho_crm_report
wp_woo_zoho_crm
wp_woo_zoho_crm_field_mapping
New WordPress options
zoho_db_version
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
recovery_mode_email_last_sent
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Zoho CRM Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.59 ▼0.621.71 ▼0.0341.43 ▼1.88
Dashboard /wp-admin2,258 ▲675.80 ▲0.93100.02 ▼17.1080.89 ▲36.95
Posts /wp-admin/edit.php2,141 ▲551.98 ▼0.0840.77 ▲4.4734.28 ▲4.79
Add New Post /wp-admin/post-new.php1,708 ▲19122.15 ▲4.66678.48 ▲52.1654.13 ▼1.29
Media Library /wp-admin/upload.php1,434 ▲524.23 ▼0.0596.45 ▼1.5082.80 ▲41.89
Products Manual Sync /wp-admin/admin.php?page=zoho-product-queue7281.146.6020.87
Orders Manual Sync /wp-admin/admin.php?page=zoho-order-queue9552.1826.4126.21
Zoho Report /wp-admin/admin.php?page=zoho-report1,0922.2133.5467.37
Zoho CRM /wp-admin/admin.php?page=wczc-menu1,0412.3833.5842.90
Upgrade Pro /wp-admin/admin.php?page=upgrade-pro1,1342.3228.8055.81
Support /wp-admin/admin.php?page=support8462.2127.8531.10
Customers Manual Sync /wp-admin/admin.php?page=zoho-queue1,0432.2129.4028.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • zoho_db_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=zoho-product-queue
    • > Error in wp-content/plugins/woo-zoho-crm/templates/zoho-product-queue.php+64
    Uncaught Error: Call to undefined function wc_get_products() in wp-content/plugins/woo-zoho-crm/templates/zoho-product-queue.php:64
    Stack trace:
    #0 wp-content/plugins/woo-zoho-crm/templates/zoho-product-queue.php(160): Product_List::record_count()
    #1 wp-content/plugins/woo-zoho-crm/templates/zoho-product-queue.php(172): Product_List->prepare_items()
    #2 wp-content/plugins/woo-zoho-crm/includes/plugin-pages.php(35): require_once('/var/www/wordpr...')
    #3 wp-includes/class-wp-hook.php(310): zoho_product_queue()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 50% 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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PrepareArray' not found in wp-content/plugins/woo-zoho-crm/api/account.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/woo-zoho-crm/api/events.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/woo-zoho-crm/api/events.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PrepareArray' not found in wp-content/plugins/woo-zoho-crm/api/product.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PrepareArray' not found in wp-content/plugins/woo-zoho-crm/api/salesorder.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PrepareArray' not found in wp-content/plugins/woo-zoho-crm/api/customer.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

woo-zoho-crm/woocommerce-zoho.php 85% from 13 tests

The entry point to "WooCommerce Zoho CRM Integration" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-zoho-crm.php" instead of "woocommerce-zoho.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected13,209 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,086198,787
SVG1002,671
PHP181992511,565
JavaScript3921186

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.09
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods55
▷ Static methods814.55%
▷ Public methods55100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/zoho.png3.70KB1.07KB▼ 71.12%
images/sort_desc_disabled.png0.14KB0.25KB0.00%
images/sort_asc_disabled.png0.14KB0.25KB0.00%
images/sort_asc.png0.16KB0.25KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%