84% pardot

Code Review | Account Engagement

WordPress plugin Account Engagement scored84%from 54 tests.

About plugin

  • Plugin page: pardot
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 31, 2012
  • Latest release: Nov 13, 2023
  • Number of updates: 149
  • Update frequency: every 27.5 days
  • Top authors: cliffseal (79.87%)salesforcepardot (10.74%)barry.hughes (10.74%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /189,087 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.44MB] [CPU: ▼3.43ms] Passed 4 tests

This is a short check of server-side resources used by Account Engagement
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4938.45 ▼2.75
Dashboard /wp-admin3.78 ▲0.4346.33 ▼18.92
Posts /wp-admin/edit.php3.83 ▲0.4749.95 ▲3.12
Add New Post /wp-admin/post-new.php6.33 ▲0.44100.12 ▲4.83
Media Library /wp-admin/upload.php3.64 ▲0.4140.83 ▲7.67
Account Engagement /wp-admin/options-general.php?page=pardot3.6236.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
pardot_crypto_key
pardot-code-verifier
can_compress_scripts
widget_pardot-forms
widget_pardot-dynamic-content
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Account Engagement
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17313.42 ▼1.228.53 ▲6.7537.75 ▼5.01
Dashboard /wp-admin2,210 ▲325.58 ▼0.0291.57 ▼26.4642.16 ▼4.91
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0040.58 ▲2.1237.20 ▲2.62
Add New Post /wp-admin/post-new.php6,414 ▲4,88828.90 ▲5.45906.82 ▲256.6140.49 ▼8.16
Media Library /wp-admin/upload.php1,415 ▲124.20 ▼0.01100.38 ▲6.3642.56 ▲0.96
Account Engagement /wp-admin/options-general.php?page=pardot9061.6726.8126.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_pardot-forms
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • pardot-code-verifier
    • widget_recent-posts
    • can_compress_scripts
    • widget_pardot-dynamic-content

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pardot/includes/pardot-settings-class.php:1408
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pardot/includes/pardot-plugin-class.php:79
    • > PHP Warning
      Use of undefined constant MONTH_IN_SECONDS - assumed 'MONTH_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pardot/pardot.php on line 43
    • > PHP Warning
      Use of undefined constant MONTH_IN_SECONDS - assumed 'MONTH_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pardot/pardot.php on line 47
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pardot/includes/pardot-forms-widget-class.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pardot/includes/pardot-plugin-class.php:79
    • > PHP Warning
      Use of undefined constant PARDOT_API_CACHE_TIMEOUT - assumed 'PARDOT_API_CACHE_TIMEOUT' (this will throw an Error in a future version of PHP) in wp-content/plugins/pardot/includes/pardot-plugin-class.php on line 1325
    • > PHP Warning
      Use of undefined constant MONTH_IN_SECONDS - assumed 'MONTH_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pardot/pardot.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pardot/includes/popup.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (A Form block on a page)
You can take inspiration from this readme.txt

pardot/pardot.php Passed 13 tests

The main PHP script in "Account Engagement" version 2.1.0 is automatically included on every request by WordPress
134 characters long description:
Connect your WordPress to Account Engagement with shortcode and widgets for campaign tracking, quick form access, and dynamic content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin25,929 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JSON40023,183
PHP136242,2112,201
JavaScript7106149451
CSS3121058
Sass27036

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.37
Average class complexity43.14
▷ Minimum class complexity2.00
▷ Maximum class complexity100.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods122
▷ Static methods4335.25%
▷ Public methods11291.80%
▷ Protected methods00.00%
▷ Private methods108.20%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants741.18%
▷ Class constants1058.82%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.52MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png58.66KB18.55KB▼ 68.38%
images/salesforce-button.png1.99KB0.90KB▼ 55.03%
screenshot-4.png92.90KB30.76KB▼ 66.89%
images/salesforce-logo.png24.23KB10.67KB▼ 55.96%
images/pardot-button.png1.76KB1.18KB▼ 32.78%