10% shopp-activecampaign

Code Review | Shopp + ActiveCampaign

WordPress plugin Shopp + ActiveCampaign scored 10% from 54 tests.

About plugin

  • Plugin page: shopp-activecampaign
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2012
  • Latest release: Aug 25, 2014
  • Number of updates: 10
  • Update frequency: every 65.5 days
  • Top authors: lorenzocaum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 991 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/shopp-activecampaign/shopp-activecampaign.php+47
    Accessing static property Shopp_ActiveCampaign::$APIURL as non static

Server metrics [RAM: ▼1.79MB] [CPU: ▼53.43ms] Passed 4 tests

An overview of server-side resources used by Shopp + ActiveCampaign
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.277.30 ▼46.78
Dashboard /wp-admin2.21 ▼1.098.46 ▼40.00
Posts /wp-admin/edit.php2.21 ▼1.147.84 ▼41.79
Add New Post /wp-admin/post-new.php2.21 ▼3.677.96 ▼85.15
Media Library /wp-admin/upload.php2.21 ▼1.028.28 ▼27.36

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Shopp + ActiveCampaign
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.55 ▼0.741.91 ▼0.3042.02 ▼2.25
Dashboard /wp-admin2,208 ▲204.85 ▼1.02103.23 ▼15.9438.65 ▼5.59
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0835.84 ▼1.6231.77 ▼2.84
Add New Post /wp-admin/post-new.php1,530 ▲1023.30 ▲0.25682.90 ▲53.9748.22 ▼16.72
Media Library /wp-admin/upload.php1,390 ▲54.17 ▼0.0096.25 ▼7.2441.18 ▼5.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/shopp-activecampaign/shopp-activecampaign.php+47
    Accessing static property Shopp_ActiveCampaign::$APIURL as non static
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Message.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Group.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Form.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Subscriber.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Account.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Auth.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Design.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/User.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/List.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/shopp-activecampaign/inc/includes/Campaign.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (The Shopp + ActiveCampaign WordPress admin page.), #2 (An additional view of the Shopp + ActiveCampaign WordPress admin page.)
The official readme.txt might help

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

Analyzing the main PHP file in "Shopp + ActiveCampaign" version 1.3
139 characters long description:
Customers who opt-in to email marketing from your WordPress ecommerce site during checkout are added to a specified list on ActiveCampaign.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,018 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14203491,005
CSS13013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.85
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods103
▷ Static methods10.97%
▷ Public methods103100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.38MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png229.66KB71.73KB▼ 68.77%
screenshot-1.png133.83KB47.13KB▼ 64.78%
images/shopp-email-marketing-opt-in.png25.97KB7.39KB▼ 71.54%