58% activecampaign-for-woocommerce

Code Review | ActiveCampaign for WooCommerce

WordPress plugin ActiveCampaign for WooCommerce scored58%from 54 tests.

About plugin

  • Plugin page: activecampaign-fo...
  • Plugin version: 2.5.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 124
  • Update frequency: every 15.9 days
  • Top authors: acteamintegrations (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

7,000+ active /338,924 total downloads

Benchmarks

Plugin footprint 48% 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.01MB] [CPU: ▼6.22ms] Passed 4 tests

An overview of server-side resources used by ActiveCampaign for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0031.98 ▼6.02
Dashboard /wp-admin3.31 ▼0.0446.60 ▼11.40
Posts /wp-admin/edit.php3.36 ▲0.0047.21 ▼3.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.11 ▼3.95
Media Library /wp-admin/upload.php3.23 ▲0.0035.07 ▲2.05

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ActiveCampaign for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.21 ▲0.011.73 ▼0.1737.36 ▼1.05
Dashboard /wp-admin2,195 ▲145.55 ▼0.1590.33 ▼9.3140.29 ▲1.90
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0139.18 ▲1.7835.29 ▲1.34
Add New Post /wp-admin/post-new.php1,529 ▲323.45 ▲0.33590.96 ▼149.5649.24 ▼0.17
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.1098.16 ▼28.3941.65 ▼14.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/activecampaign-for-woocommerce/includes/class-activecampaign-for-woocommerce-logger.php+23
    Uncaught Error: Class 'WC_Log_Handler_DB' not found in wp-content/plugins/activecampaign-for-woocommerce/includes/class-activecampaign-for-woocommerce-logger.php:23
    Stack trace:
    #0 wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/composer/ClassLoader.php(478): include()
    #1 wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
    #2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
    #3 wp-content/plugins/activecampaign-for-woocommerce/includes/commands/class-activecampaign-for-woocommerce-uninstall-plugin-command.php(39): spl_autoload_call()
    #4 wp-content/plugins/activecampaign-for-woocommerce/uninstall.php(27): Activecampaign_For_Woocommerce_Uninstall_Plugin_Command->execute()
    #5 wp-content/plugins/activecampaign-for-woocommerce/uninstall.php(30): activecampaign_for_woocommerce_uninstall()
    #6 /var/www/wordpre
  • Incomplete uninstall procedure, leaving 416 files (7.64MB) in the plugin directory
    • (new file) ac_vendor/brick/math/src/BigRational.php
    • (new file) ac_vendor/brick/math/src/BigInteger.php
    • (new file) README.txt
    • (new file) CHANGELOG.txt
    • (new file) ac_vendor/brick/math/src/Exception/IntegerOverflowException.php
    • (new file) ac_vendor/autoload.php
    • (new file) LICENSE.txt
    • (new file) ac_vendor/brick/math/src/BigDecimal.php
    • (new file) ac_vendor/brick/math/src/Exception/DivisionByZeroException.php
    • (new file) ac_vendor/brick/math/src/BigNumber.php
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/activecampaign-for-woocommerce/public/partials/activecampaign-for-woocommerce-public-display.php
  • 212× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Activecampaign_For_Woocommerce_Executable_Interface' not found in wp-content/plugins/activecampaign-for-woocommerce/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-contacts.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'AcVendor\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/php-di/php-di/src/Compiler/RequestedEntryHolder.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'AcVendor\\Brick\\Money\\Exception\\MoneyException' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/brick/money/src/Exception/CurrencyConversionException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'AcVendor\\DI\\Definition\\Source\\Autowiring' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/php-di/php-di/src/Definition/Source/NoAutowiring.php:13
    • > PHP Fatal error
      Trait 'Activecampaign_For_Woocommerce_Admin_Utilities' not found in wp-content/plugins/activecampaign-for-woocommerce/admin/class-activecampaign-for-woocommerce-admin-historical-sync.php on line 26
    • > PHP Fatal error
      Uncaught Error: Interface 'AcVendor\\GuzzleHttp\\BodySummarizerInterface' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/guzzlehttp/guzzle/src/BodySummarizer.php:6
    • > PHP Fatal error
      Trait 'Activecampaign_For_Woocommerce_Admin_Utilities' not found in wp-content/plugins/activecampaign-for-woocommerce/includes/class-activecampaign-for-woocommerce-activator.php on line 25
    • > PHP Fatal error
      Uncaught Error: Interface 'AcVendor\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/php-di/php-di/src/Definition/Resolver/EnvironmentVariableResolver.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'AcVendor\\DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/activecampaign-for-woocommerce/ac_vendor/php-di/php-di/src/Definition/Source/AnnotationBasedAutowiring.php:32
    • > PHP Fatal error
      Trait 'Activecampaign_For_Woocommerce_Data_Validation' not found in wp-content/plugins/activecampaign-for-woocommerce/includes/customers/class-activecampaign-for-woocommerce-customer-utilities.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: email, ecommerce, abandoned cart, marketing, activecampaign...

activecampaign-for-woocommerce/activecampaign-for-woocommerce.php 92% from 13 tests

"ActiveCampaign for WooCommerce" version 2.5.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("6.0" instead of "7.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected37,441 lines of code in 398 files:
LanguageFilesBlank linesComment linesLines of code
PHP3844,04720,94335,467
JSON1001,040
JavaScript915449903
PO File11115
XML10015
CSS2051

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.51
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces49
Interfaces55
Traits23
Classes274
▷ Abstract classes72.55%
▷ Concrete classes26797.45%
▷ Final classes5821.72%
Methods2,375
▷ Static methods25810.86%
▷ Public methods1,97383.07%
▷ Protected methods291.22%
▷ Private methods37315.71%
Functions179
▷ Named functions3519.55%
▷ Anonymous functions14480.45%
Constants176
▷ Global constants3218.18%
▷ Class constants14481.82%
▷ Public constants13090.28%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.54MB with 1.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-6.png451.69KB116.84KB▼ 74.13%
assets/screenshot-5.png472.16KB115.00KB▼ 75.64%
assets/screenshot-4.png455.71KB113.89KB▼ 75.01%
assets/icon-256x256.png6.93KB2.91KB▼ 58.03%
assets/screenshot-2.png115.94KB52.27KB▼ 54.91%