84% wc-ac-hook

Code Review | WC-AC Hook

WordPress plugin WC-AC Hook scored84%from 54 tests.

About plugin

  • Plugin page: wc-ac-hook
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2015
  • Latest release: Aug 2, 2023
  • Number of updates: 38
  • Update frequency: every 80.3 days
  • Top authors: mtreherne (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /15,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.30ms] Passed 4 tests

A check of server-side resources used by WC-AC Hook
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.56 ▼3.95
Dashboard /wp-admin3.35 ▲0.0546.14 ▼3.21
Posts /wp-admin/edit.php3.40 ▲0.0546.24 ▼1.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.57 ▼16.79
Media Library /wp-admin/upload.php3.27 ▲0.0533.89 ▼1.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WC-AC Hook
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.40 ▼1.161.59 ▼0.2041.71 ▼8.84
Dashboard /wp-admin2,206 ▲155.91 ▼0.03106.88 ▲1.1636.30 ▼6.18
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0140.17 ▼1.2935.13 ▲2.26
Add New Post /wp-admin/post-new.php1,537 ▲2323.38 ▲5.87696.44 ▲7.6953.32 ▼1.57
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0194.11 ▼8.8942.11 ▼4.94

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Organization.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Deal.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Tracking.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Contact.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Form.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Group.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Auth.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Automation.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Tag.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'mtreherne\\WC_AC_Hook\\ActiveCampaign' not found in wp-content/plugins/wc-ac-hook/activecampaign-api-php/includes/Message.class.php:4

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: activecampaign, woocommerce

wc-ac-hook/wc-ac-hook.php Passed 13 tests

The entry point to "WC-AC Hook" version 1.4.2 is a PHP file that has certain tags in its header comment area
139 characters long description:
Integrates WooCommerce with ActiveCampaign by adding or updating a contact on ActiveCampaign with specified tags, when an order is created.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,922 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP294272841,852
Markdown137046
JSON10024

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.04
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods178
▷ Static methods00.00%
▷ Public methods17799.44%
▷ Protected methods10.56%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin