79% integration-dynamics

Code Review | Dynamics 365 Integration

WordPress plugin Dynamics 365 Integration scored79%from 54 tests.

About plugin

  • Plugin page: integration-dynamics
  • Plugin version: 1.3.17
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2016
  • Latest release: Sep 6, 2023
  • Number of updates: 118
  • Update frequency: every 21.5 days
  • Top authors: alexacrm (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /44,645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.30MB] [CPU: ▲5.34ms] Passed 4 tests

An overview of server-side resources used by Dynamics 365 Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.44 ▲0.9846.16 ▲3.11
Dashboard /wp-admin4.74 ▲1.4356.73 ▲7.54
Posts /wp-admin/edit.php4.80 ▲1.4558.01 ▲1.53
Add New Post /wp-admin/post-new.php7.22 ▲1.33105.06 ▲15.67
Media Library /wp-admin/upload.php4.74 ▲1.5144.17 ▲9.19
Forms /wp-admin/admin.php?page=wordpresscrm_forms4.7140.10
Images /wp-admin/admin.php?page=wordpresscrm_attachments4.7149.01
Connection /wp-admin/admin.php?page=wordpresscrm4.7139.04
Messages /wp-admin/admin.php?page=wordpresscrm_messages4.7139.58
About /wp-admin/admin.php?page=wordpresscrm_about4.7134.78

Server storage [IO: ▲2.61MB] [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: 597 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
can_compress_scripts
msdyncrm_messages
widget_recent-posts
msdyncrm_forms
recovery_mode_email_last_sent
widget_recent-comments
msdyncrm_attachments
widget_theysaidso_widget
msdyncrm_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Dynamics 365 Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13113.15 ▼1.491.71 ▼0.0437.23 ▼13.19
Dashboard /wp-admin2,269 ▲815.86 ▲0.7995.73 ▼13.5639.29 ▼4.27
Posts /wp-admin/edit.php2,156 ▲672.02 ▼0.0339.88 ▼1.6335.00 ▼1.79
Add New Post /wp-admin/post-new.php1,564 ▲3123.16 ▼0.02609.27 ▼68.9155.67 ▲1.31
Media Library /wp-admin/upload.php1,448 ▲634.28 ▲0.0398.07 ▼12.8041.27 ▼11.03
Forms /wp-admin/admin.php?page=wordpresscrm_forms9082.0725.0733.06
Images /wp-admin/admin.php?page=wordpresscrm_attachments7911.536.8220.20
Connection /wp-admin/admin.php?page=wordpresscrm1,2381.8627.1832.76
Messages /wp-admin/admin.php?page=wordpresscrm_messages9292.0623.9327.75
About /wp-admin/admin.php?page=wordpresscrm_about9412.0725.7727.64

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 11 options
    • msdyncrm_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • msdyncrm_forms
    • msdyncrm_attachments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • db_upgraded
    • msdyncrm_messages
    • can_compress_scripts
    • ...

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=wordpresscrm_attachments
    • > Error in wp-content/plugins/integration-dynamics/src/Admin/Tab/Attachments.php+40
    Uncaught Error: Call to a member function entity() on null in wp-content/plugins/integration-dynamics/src/Admin/Tab/Attachments.php:40
    Stack trace:
    #0 wp-content/plugins/integration-dynamics/src/Admin/Tab/Attachments.php(100): AlexaCRM\WordpressCRM\Admin\Tab\Attachments->getViews()
    #1 wp-includes/class-wp-hook.php(310): AlexaCRM\WordpressCRM\Admin\Tab\Attachments->render()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 291× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'AlexaCRM\\CRMToolkit\\Entity\\OptionSet' not found in wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/Entity/OptionSet/Boolean.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/integration-dynamics/vendor/twig/twig/src/Node/BlockNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/integration-dynamics/src/Shortcode/Twig/Nodes/FormNode.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/integration-dynamics/vendor/twig/twig/src/Node/PrintNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/integration-dynamics/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'AlexaCRM\\CRMToolkit\\SoapFault' not found in wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/InvalidSecurityException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/integration-dynamics/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: crm, shortcode, form, dynamics 365, portal...

integration-dynamics/integration-dynamics.php Passed 13 tests

The main PHP script in "Dynamics 365 Integration" version 1.3.17 is automatically included on every request by WordPress
72 characters long description:
The easiest way to connect Dynamics 365 and Dynamics CRM with WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin45,290 lines of code in 548 files:
LanguageFilesBlank linesComment linesLines of code
PHP5089,24319,70140,557
CSS3124512,011
JSON900808
JavaScript726386698
Markdown91960677
Twig8112479
XML23036
YAML15014
reStructuredText18510

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.22
▷ Minimum class complexity1.00
▷ Maximum class complexity238.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces65
Interfaces31
Traits4
Classes416
▷ Abstract classes276.49%
▷ Concrete classes38993.51%
▷ Final classes5814.91%
Methods2,626
▷ Static methods30411.58%
▷ Public methods2,09179.63%
▷ Protected methods28410.81%
▷ Private methods2519.56%
Functions237
▷ Named functions14059.07%
▷ Anonymous functions9740.93%
Constants224
▷ Global constants73.12%
▷ Class constants21796.88%
▷ Public constants217100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/front/css/images/ui-bg_flat_0_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
resources/front/css/images/ui-bg_glass_0_FFF_1x400.png0.20KB0.09KB▼ 57.49%
resources/front/css/images/ui-bg_flat_60_c8c8c8_40x100.png0.22KB0.08KB▼ 62.17%
resources/front/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
resources/front/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%