84% crm-salesforce-learndash-integration

Code Review | CRM Salesforce LearnDash Integration

WordPress plugin CRM Salesforce LearnDash Integration scored84%from 54 tests.

About plugin

  • Plugin page: crm-salesforce-le...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.4.0
  • WordPress version: 6.3.1
  • First release: Apr 2, 2019
  • Latest release: Apr 12, 2020
  • Number of updates: 11
  • Update frequency: every 34.2 days
  • Top authors: qfnetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /949 total downloads


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.06MB] [CPU: ▼18.67ms] Passed 4 tests

This is a short check of server-side resources used by CRM Salesforce LearnDash Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.06 ▼6.00
Dashboard /wp-admin3.35 ▲0.0034.10 ▼29.78
Posts /wp-admin/edit.php3.42 ▲0.0635.80 ▼12.00
Add New Post /wp-admin/post-new.php5.58 ▼0.3173.15 ▼26.88
Media Library /wp-admin/upload.php3.35 ▲0.1239.05 ▲2.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 580 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by CRM Salesforce LearnDash Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,450 ▼1,29612.42 ▼0.791.80 ▼0.1340.46 ▼3.49
Dashboard /wp-admin843 ▼1,3451.38 ▼3.5212.46 ▼105.7519.49 ▼24.83
Posts /wp-admin/edit.php854 ▼1,2351.14 ▼1.016.62 ▼30.7516.50 ▼17.95
Add New Post /wp-admin/post-new.php580 ▼9561.73 ▼21.7319.44 ▼629.008.50 ▼48.79
Media Library /wp-admin/upload.php739 ▼6461.73 ▼2.4620.71 ▼82.6219.94 ▼23.34

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 255× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/Node/IfNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Timber\\Post' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/timber/timber/lib/Image.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crm-salesforce-learndash-integration/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 97% 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:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

crm-salesforce-learndash-integration/crm-salesforce-learndash-integration.php Passed 13 tests

This is the main PHP file of "CRM Salesforce LearnDash Integration" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
54 characters long description:
Integrates your course enrollments with Salesforce CRM

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
Success! There were no dangerous files found in this plugin24,998 lines of code in 560 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell16146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.07
▷ Minimum class complexity1.00
▷ Maximum class complexity172.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
▷ Abstract classes122.51%
▷ Concrete classes46697.49%
▷ Final classes4710.09%
▷ Static methods24115.97%
▷ Public methods1,25383.04%
▷ Protected methods17011.27%
▷ Private methods865.70%
▷ Named functions9570.90%
▷ Anonymous functions3929.10%
▷ Global constants1216.44%
▷ Class constants6183.56%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin