78% wp-widget-sugarcrm-lead-module

Code Review | WordPress to SugarCRM Lead

WordPress plugin WordPress to SugarCRM Lead scored78%from 54 tests.

About plugin

  • Plugin page: wp-widget-sugarcr...
  • Plugin version: 5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2014
  • Latest release: May 22, 2023
  • Number of updates: 219
  • Update frequency: every 14.2 days
  • Top authors: dipesh_patel (99.54%)

Code review

54 tests

User reviews

23 reviews

Install metrics

100+ active /14,105 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
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▲2.54ms] Passed 4 tests

A check of server-side resources used by WordPress to SugarCRM Lead
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2743.17 ▲4.04
Dashboard /wp-admin3.56 ▲0.2550.61 ▲1.82
Posts /wp-admin/edit.php3.67 ▲0.3152.99 ▲4.84
Add New Post /wp-admin/post-new.php6.14 ▲0.2594.53 ▼0.55
Media Library /wp-admin/upload.php3.48 ▲0.2547.67 ▲10.00
Your SugarCRM /wp-admin/admin.php?page=SugarSetting3.5937.47
Lead Module /wp-admin/admin.php?page=mapping_table3.5733.96

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 1 new table, 13 new options
New tables
oepl_crm_map_fields
New WordPress options
widget_theysaidso_widget
OEPL_SugarCRMSuccessMessage
theysaidso_admin_options
OEPL_SugarCRMReqFieldsMessage
widget_oepl_lead_widget
db_upgraded
OEPL_SugarCRMFailureMessage
OEPL_PLUGIN_VERSION
can_compress_scripts
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress to SugarCRM Lead
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,066 ▲32013.96 ▼0.398.31 ▲6.7740.60 ▲0.25
Dashboard /wp-admin2,334 ▲1534.96 ▼0.6284.16 ▼22.7184.95 ▲39.19
Posts /wp-admin/edit.php2,255 ▲1522.39 ▲0.4439.31 ▲2.7934.28 ▼1.19
Add New Post /wp-admin/post-new.php1,829 ▲29622.63 ▼0.84588.53 ▼109.1830.36 ▼29.86
Media Library /wp-admin/upload.php1,549 ▲1464.60 ▲0.37105.68 ▼3.2944.99 ▼3.10
Your SugarCRM /wp-admin/admin.php?page=SugarSetting1,1471.9028.7538.31
Lead Module /wp-admin/admin.php?page=mapping_table1,2561.9728.1329.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • OEPL_Captcha_status
    • theysaidso_admin_options
    • widget_recent-comments
    • OEPL_PLUGIN_VERSION
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_oepl_lead_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-widget-sugarcrm-lead-module/captcha.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/Common-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/Fields_map_table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/OEPL-Widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-widget-sugarcrm-lead-module/oepl.conf.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/oepl.crm.cls.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/admin-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-widget-sugarcrm-lead-module/uninstall.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/oepl.conf.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-widget-sugarcrm-lead-module/SugarSettings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Donate link: Invalid URI found ("")
The official readme.txt might help

wp-widget-sugarcrm-lead-module/oepl.php 92% from 13 tests

This is the main PHP file of "WordPress to SugarCRM Lead" version 5.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-widget-sugarcrm-lead-module.php" instead of "oepl.php")

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
Everything looks great! No dangerous files found in this plugin5,150 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3242422,268
PHP102111191,794
CSS31381997
SVG20183
XML1008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.00
▷ Minimum class complexity24.00
▷ Maximum class complexity71.00
Average method complexity6.74
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.21MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/screenshot-4.png19.49KB9.86KB▼ 49.42%
image/NA_icon.png2.26KB1.36KB▼ 39.82%
screenshot/screenshot-1.PNG35.21KB16.06KB▼ 54.40%
screenshot/screenshot-2.png76.66KB38.75KB▼ 49.46%
image/minus-icon.png0.96KB0.80KB▼ 16.73%