68% codup-wp-freshsales

Code Review | WordPress to Freshsales Integration

WordPress plugin WordPress to Freshsales Integration scored68%from 54 tests.

About plugin

  • Plugin page: codup-wp-freshsales
  • Plugin version: 1.3.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9.2
  • WordPress version: 6.3.1
  • First release: May 24, 2019
  • Latest release: Sep 14, 2022
  • Number of updates: 41
  • Update frequency: every 29.9 days
  • Top authors: codup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,703 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.13MB] [CPU: ▼41.18ms] Passed 4 tests

This is a short check of server-side resources used by WordPress to Freshsales Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6213.99 ▼24.90
Dashboard /wp-admin2.89 ▼0.4218.77 ▼29.93
Posts /wp-admin/edit.php2.89 ▼0.4717.95 ▼30.27
Add New Post /wp-admin/post-new.php2.89 ▼3.0018.95 ▼79.63
Media Library /wp-admin/upload.php2.89 ▼0.3417.50 ▼17.62

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress to Freshsales Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.72 ▼0.649.56 ▲7.8337.40 ▼6.36
Dashboard /wp-admin2,235 ▲464.95 ▼0.97110.26 ▲1.8343.54 ▲0.18
Posts /wp-admin/edit.php2,123 ▲342.04 ▼0.0139.74 ▲1.6333.96 ▲0.29
Add New Post /wp-admin/post-new.php1,542 ▼523.22 ▲5.07627.03 ▼2.7258.69 ▲1.70
Media Library /wp-admin/upload.php1,414 ▲264.23 ▲0.1098.51 ▼4.5740.80 ▼2.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/codup-wp-freshsales/templates/admin/gravity-form-tab/gravityform-field-mapping.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: lead_fields in wp-content/plugins/codup-wp-freshsales/templates/admin/contact-form-tab/freshsales-field-mapping.php on line 8
    • > PHP Notice
      Undefined variable: form_fields in wp-content/plugins/codup-wp-freshsales/templates/admin/gravity-form-tab/gravityform-field-mapping.php on line 9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codup-wp-freshsales/templates/admin/gravity-form-tab/gravityform-field-mapping.php on line 15
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codup-wp-freshsales/templates/admin/contact-form-tab/freshsales-field-mapping.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/codup-wp-freshsales/templates/admin/contact-form-tab/wpcf7-freshsales-tab.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/codup-wp-freshsales/templates/admin/formidable-form-tab/wpff-freshsales-tab.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codup-wp-freshsales/includes/functions.php:38
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codup-wp-freshsales/templates/admin/gravity-form-tab/gravityform-field-mapping.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/codup-wp-freshsales/includes/freshsales-lead-fields.php:10
    • > PHP Notice
      Undefined variable: lead_fields in wp-content/plugins/codup-wp-freshsales/templates/admin/gravity-form-tab/gravityform-field-mapping.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes: Please take inspiration from this readme.txt

codup-wp-freshsales/wp-freshsales-integration.php 92% from 13 tests

The principal PHP file in "WordPress to Freshsales Integration" v. 1.3.2.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("codup-wp-freshsales.php" instead of "wp-freshsales-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,165 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP151293961,067
JavaScript210055
CSS24043

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.40
▷ Minimum class complexity3.00
▷ Maximum class complexity30.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods54100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin