77% activecampaign-subscription-forms

Code Review | ActiveCampaign - Forms, Site Tracking, Live Chat

WordPress plugin ActiveCampaign - Forms, Site Tracking, Live Chat scored77%from 54 tests.

About plugin

  • Plugin page: activecampaign-su...
  • Plugin version: 8.1.13
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2009
  • Latest release: Oct 9, 2023
  • Number of updates: 191
  • Update frequency: every 26.7 days
  • Top authors: activecampaign (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

70,000+ active /1,001,838 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼4.44ms] Passed 4 tests

A check of server-side resources used by ActiveCampaign - Forms, Site Tracking, Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4446.18 ▲8.57
Dashboard /wp-admin3.73 ▲0.4344.45 ▼9.05
Posts /wp-admin/edit.php3.79 ▲0.4345.47 ▲0.24
Add New Post /wp-admin/post-new.php6.33 ▲0.4481.44 ▼15.20
Media Library /wp-admin/upload.php3.66 ▲0.4338.59 ▲6.26
ActiveCampaign /wp-admin/options-general.php?page=activecampaign3.5632.93

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
activecampaign_notice_index
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ActiveCampaign - Forms, Site Tracking, Live Chat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9314.42 ▼0.191.99 ▲0.4140.18 ▼4.32
Dashboard /wp-admin2,207 ▲335.72 ▲0.0583.33 ▼4.5938.11 ▼3.79
Posts /wp-admin/edit.php2,120 ▲202.30 ▲0.2835.08 ▲1.3833.02 ▼2.56
Add New Post /wp-admin/post-new.php6,435 ▲4,90729.77 ▲6.54891.11 ▲220.9137.91 ▼13.24
Media Library /wp-admin/upload.php1,481 ▲874.55 ▲0.40106.17 ▲7.7044.97 ▼1.78
ActiveCampaign /wp-admin/options-general.php?page=activecampaign8752.1626.6839.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • activecampaign_notice_index
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/activecampaign-subscription-forms/randomimage.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Webhook.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Account.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/activecampaign-subscription-forms/activecampaign.php:866
    • > PHP Warning
      require_once(wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/config.php): failed to open stream: No such file or directory in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/ActiveCampaign.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Deal.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Tracking.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/User.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Campaign.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/Message.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaignWordPress' not found in wp-content/plugins/activecampaign-subscription-forms/activecampaign-api-php/List.class.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Connect your WordPress site to ActiveCampaign), #2 (ActiveCampaign features an easy-to-use Automation Builder with Page Event triggers), #3 (Segment and target users based on their interactions with your website), #4 (Settings page for ActiveCampaign plugin), #5 (Configuring your form settings), #6 (Using the ActiveCampaign Button in the Classic Editor), #7 (Viewing the output of the [activecampaign] shortcode), #8 (Adding an AC Forms block into the Gutenberg Block Editor)
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

activecampaign-subscription-forms/activecampaign.php 85% from 13 tests

This is the main PHP file of "ActiveCampaign - Forms, Site Tracking, Live Chat" version 8.1.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 467 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("activecampaign-subscription-forms.php" instead of "activecampaign.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,583 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP234423042,373
JavaScript41928112
CSS316072
JSON10014
Markdown111012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.06
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods152
▷ Static methods00.00%
▷ Public methods15199.34%
▷ Protected methods00.00%
▷ Private methods10.66%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.36MB with 0.27MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
settings1.png195.31KB21.59KB▼ 88.94%
editor_icon.png8.38KB1.96KB▼ 76.64%
screenshot-1.png163.61KB68.97KB▼ 57.84%