84% integrate-dynamics-365-crm

Code Review | Integrate Dynamics 365 CRM

WordPress plugin Integrate Dynamics 365 CRM scored84%from 54 tests.

About plugin

  • Plugin page: integrate-dynamic...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2022
  • Latest release: Sep 28, 2023
  • Number of updates: 7
  • Update frequency: every 53.1 days
  • Top authors: manish471 (85.71%)moazsup (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▲2.12ms] Passed 4 tests

This is a short check of server-side resources used by Integrate Dynamics 365 CRM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1948.12 ▲6.03
Dashboard /wp-admin3.60 ▲0.2955.47 ▼3.05
Posts /wp-admin/edit.php3.65 ▲0.2955.06 ▲7.42
Add New Post /wp-admin/post-new.php6.12 ▲0.2395.05 ▼0.61
Media Library /wp-admin/upload.php3.46 ▲0.2342.29 ▲6.10

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Integrate Dynamics 365 CRM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.60 ▼0.032.01 ▲0.1547.50 ▲2.91
Dashboard /wp-admin2,195 ▲185.64 ▲0.1395.50 ▼10.4484.22 ▲41.59
Posts /wp-admin/edit.php2,112 ▲121.97 ▼0.0336.13 ▼3.4233.17 ▼3.07
Add New Post /wp-admin/post-new.php1,558 ▲3223.28 ▲0.17748.41 ▲50.2157.45 ▼0.19
Media Library /wp-admin/upload.php1,415 ▲124.16 ▼0.06105.85 ▲6.2872.35 ▲26.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MoDynamics365ObjectSync\\add_action() in wp-content/plugins/integrate-dynamics-365-crm/integrate-dynamics-365-crm.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
You can take inspiration from this readme.txt

integrate-dynamics-365-crm/integrate-dynamics-365-crm.php Passed 13 tests

The principal PHP file in "Integrate Dynamics 365 CRM" v. 1.0.4 is loaded by WordPress automatically on each request
125 characters long description:
This plugin will allow you to sync CRM Objects like contacts, accounts, leads, etc. between Dynamics 365 Sales and wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin4,823 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP347353293,240
CSS5162201,415
JavaScript25117117
JSON20031
SVG60020

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.33
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods178
▷ Static methods6536.52%
▷ Public methods12469.66%
▷ Protected methods00.00%
▷ Private methods5430.34%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants22
▷ Global constants313.64%
▷ Class constants1986.36%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/message.png10.04KB1.56KB▼ 84.43%
images/checked.png14.18KB7.62KB▼ 46.24%
images/crown.png13.03KB6.30KB▼ 51.67%
images/graph.png3.44KB2.18KB▼ 36.74%
images/insignia.png24.30KB5.08KB▼ 79.08%