83% object-data-sync-for-salesforce

Code Review | Object Data Sync For Salesforce

WordPress plugin Object Data Sync For Salesforce scored83%from 54 tests.

About plugin

  • Plugin page: object-data-sync-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Oct 6, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 52
  • Update frequency: every 14.7 days
  • Top authors: prashantrajkhurana (53.85%)cyberlord92 (48.08%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /2,679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.89MB] [CPU: ▲3.24ms] Passed 4 tests

Server-side resources used by Object Data Sync For Salesforce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.50 ▲1.0445.42 ▲1.39
Dashboard /wp-admin4.20 ▲0.8953.54 ▲5.82
Posts /wp-admin/edit.php4.25 ▲0.8956.69 ▲5.83
Add New Post /wp-admin/post-new.php6.79 ▲0.90106.69 ▼0.09
Media Library /wp-admin/upload.php4.12 ▲0.8944.28 ▲10.15
Configuration Guide /wp-admin/admin.php?page=plugin_guide4.0341.59
Pardot Setup Guide /wp-admin/admin.php?page=pardot_guide4.0342.15
Troubleshoot /wp-admin/admin.php?page=troubleshoot4.0338.45
Object Data Sync For Salesforce /wp-admin/admin.php?page=mo_sf_sync4.1242.18

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 126 new files
Database: 3 new tables, 6 new options
New tables
mo_sf_sync_object_mapping_meta
mo_sf_sync_audit_log_db
mo_sf_sync_object_mapping
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Object Data Sync For Salesforce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.67 ▲0.421.74 ▲0.0740.93 ▲1.21
Dashboard /wp-admin2,217 ▲375.55 ▼0.1194.63 ▼0.8776.16 ▲34.24
Posts /wp-admin/edit.php2,140 ▲371.99 ▲0.0439.27 ▼3.0535.98 ▼2.19
Add New Post /wp-admin/post-new.php6,222 ▲4,69626.36 ▲3.15848.50 ▲182.3141.69 ▼11.74
Media Library /wp-admin/upload.php1,437 ▲434.20 ▼0.0296.83 ▼4.9964.11 ▲17.78
Configuration Guide /wp-admin/admin.php?page=plugin_guide1,4882.1123.8272.24
Pardot Setup Guide /wp-admin/admin.php?page=pardot_guide1,3182.0025.0462.06
Troubleshoot /wp-admin/admin.php?page=troubleshoot1,2522.3338.2139.61
Object Data Sync For Salesforce /wp-admin/admin.php?page=mo_sf_sync1,6232.6944.9640.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'MoSfSyncSalesforce\\Helper\\Instance' not found in wp-content/plugins/object-data-sync-for-salesforce/Services/class-db-utils.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/object-data-sync-for-salesforce/Helper/view/import-export.php:8

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

object-data-sync-for-salesforce/object-data-sync-for salesforce.php 85% from 13 tests

The main PHP file in "Object Data Sync For Salesforce" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("object-data-sync-for-salesforce.php" instead of "object-data-sync-for salesforce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected10,518 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP428172,0686,904
CSS623791,897
JavaScript710741,390
HTML1130312
SVG3008
Markdown1507

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.96
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces7
Interfaces1
Traits1
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods190
▷ Static methods5227.37%
▷ Public methods16687.37%
▷ Protected methods00.00%
▷ Private methods2412.63%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants58
▷ Global constants11.72%
▷ Class constants5798.28%
▷ Public constants57100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
48 PNG files occupy 2.09MB with 0.87MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/61456.png3.64KB3.62KB▼ 0.62%
images/guide/select-sync-direction.png15.22KB6.79KB▼ 55.35%
images/miniorange.png1.49KB1.34KB▼ 10.35%
images/guide/authorization-successfull-window.png48.00KB11.17KB▼ 76.73%
images/guide/pre-connected-app-connect.png73.06KB25.80KB▼ 64.69%