84% affiliatewp-activecampaign

Code Review | AffiliateWP - ActiveCampaign

WordPress plugin AffiliateWP - ActiveCampaign scored84%from 54 tests.

About plugin

  • Plugin page: affiliatewp-activ...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Oct 7, 2015
  • Latest release: Oct 5, 2017
  • Number of updates: 14
  • Update frequency: every 53.7 days
  • Top authors: section214 (85.71%)evertiro (21.43%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,607 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼4.64ms] Passed 4 tests

Server-side resources used by AffiliateWP - ActiveCampaign
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3338.98 ▲1.19
Dashboard /wp-admin3.63 ▲0.3345.62 ▼2.20
Posts /wp-admin/edit.php3.68 ▲0.3246.64 ▼1.94
Add New Post /wp-admin/post-new.php6.21 ▲0.3282.94 ▼15.60
Media Library /wp-admin/upload.php3.55 ▲0.3239.83 ▲5.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AffiliateWP - ActiveCampaign
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.071.74 ▲0.0240.79 ▼0.83
Dashboard /wp-admin2,213 ▲244.86 ▼0.26100.18 ▼20.5039.58 ▼3.08
Posts /wp-admin/edit.php2,095 ▲32.00 ▲0.0341.68 ▼0.0936.39 ▲1.13
Add New Post /wp-admin/post-new.php1,518 ▼1017.62 ▼5.65662.68 ▼15.1466.14 ▲11.88
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.0497.38 ▼7.5441.64 ▼7.14

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
The following issues need your attention
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Automation.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/List.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Deal.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Tracking.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Account.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AC_Contact' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Subscriber.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Webhook.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Message.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Settings.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/affiliatewp-activecampaign/includes/libraries/activecampaign-api/Design.class.php:3

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: active campaign, email, email marketing, affiliatewp, affwp...

affiliatewp-activecampaign/affiliatewp-activecampaign.php Passed 13 tests

The main file in "AffiliateWP - ActiveCampaign" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
52 characters long description:
Easily add ActiveCampaign integration to AffiliateWP

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
There were no executable files found in this plugin1,576 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP223682631,576

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.05
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods159
▷ Static methods10.63%
▷ Public methods15798.74%
▷ Protected methods00.00%
▷ Private methods21.26%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin