84% woo-salesforce-connector

Code Review | Wordpress WooCommerce Salesforce Connector

WordPress plugin Wordpress WooCommerce Salesforce Connector scored 84% from 54 tests.

About plugin

  • Plugin page: woo-salesforce-co...
  • Plugin version: 4.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Jul 26, 2023
  • Number of updates: 36
  • Update frequency: every 62.4 days
  • Top authors: webkul (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

40+ active / 5,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Wordpress WooCommerce Salesforce Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.85 ▲1.18
Dashboard /wp-admin3.31 ▲0.0044.77 ▼2.53
Posts /wp-admin/edit.php3.36 ▲0.0042.82 ▼12.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.60 ▼12.47
Media Library /wp-admin/upload.php3.23 ▲0.0032.16 ▼0.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress WooCommerce Salesforce Connector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.071.84 ▲0.1144.04 ▼3.43
Dashboard /wp-admin2,203 ▲184.86 ▼0.24106.73 ▼11.5538.87 ▼8.13
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0236.96 ▲0.0135.99 ▲2.03
Add New Post /wp-admin/post-new.php1,514 ▼017.68 ▲0.15650.98 ▼19.2371.48 ▲23.28
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0495.38 ▼3.6444.29 ▼2.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-ProductTable.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-ProductTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/woo-salesforce-connector/class-synchronized-process-category.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-CategoryTable.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-CategoryTable.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-CategoryTable.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-salesforce-connector/includes/table/woosfrest-ProductTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/woo-salesforce-connector/class-synchronized-process-product.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #2, #3, #4, #5, #6, #7, #8, #9 in woo-salesforce-connector/assets to your readme.txt
The official readme.txt might help

woo-salesforce-connector/woo-salesforce-connector.php Passed 13 tests

The main PHP file in "Wordpress WooCommerce Salesforce Connector" ver. 4.1 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Connector that lets your Salesforce connect to WooCommerce store via REST API.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin8,047 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP176436845,300
JavaScript7107522,539
CSS2373189
Markdown19019

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity67.29
▷ Minimum class complexity1.00
▷ Maximum class complexity547.00
Average method complexity7.87
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods135
▷ Static methods6548.15%
▷ Public methods12693.33%
▷ Protected methods42.96%
▷ Private methods53.70%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected