78% pardot-marketing

Code Review | Pardot Marketing

WordPress plugin Pardot Marketing scored78%from 54 tests.

About plugin

  • Plugin page: pardot-marketing
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Nov 2, 2021
  • Number of updates: 19
  • Update frequency: every 24.5 days
  • Top authors: bmarshall511 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.15ms] Passed 4 tests

A check of server-side resources used by Pardot Marketing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1943.85 ▼0.49
Dashboard /wp-admin3.51 ▲0.2050.40 ▼0.65
Posts /wp-admin/edit.php3.62 ▲0.2650.04 ▲0.33
Add New Post /wp-admin/post-new.php6.09 ▲0.2095.26 ▲0.21
Media Library /wp-admin/upload.php3.43 ▲0.2037.89 ▲1.97

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Pardot Marketing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.25 ▼1.061.77 ▼0.3045.47 ▲0.58
Dashboard /wp-admin2,255 ▲675.90 ▲0.84109.79 ▲0.7943.27 ▲1.70
Posts /wp-admin/edit.php2,137 ▲481.99 ▼0.0441.29 ▲3.8336.23 ▲1.74
Add New Post /wp-admin/post-new.php1,576 ▲5723.34 ▼0.02615.99 ▼69.9457.46 ▼0.71
Media Library /wp-admin/upload.php1,437 ▲494.34 ▲0.07100.93 ▲3.4746.38 ▲0.35

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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

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
Please fix the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pardot-marketing/classes/class-pardot-prospects-table.php
    • > /wp-content/plugins/pardot-marketing/integrations/elementor/register-widgets.php
    • > /wp-content/plugins/pardot-marketing/integrations/elementor/widgets.php
    • > /wp-content/plugins/pardot-marketing/classes/class-pardot-forms-table.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pardot-marketing/inc/admin.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Core\\DynamicTags\\Tag' not found in wp-content/plugins/pardot-marketing/integrations/elementor/dynamic-tags/request-variables.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Core\\DynamicTags\\Tag' not found in wp-content/plugins/pardot-marketing/integrations/elementor/dynamic-tags/cookies.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pardot-marketing/inc/scripts.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: elementor widget, pardot, marketing, elementor

pardot-marketing/pardot-marketing.php 85% from 13 tests

This is the main PHP file of "Pardot Marketing" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 158 characters long)

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 plugin2,589 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP123896662,480
CSS210092
JavaScript23617

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.50
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods62
▷ Static methods11.61%
▷ Public methods5690.32%
▷ Protected methods58.06%
▷ Private methods11.61%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin