77% send-cf7-data-to-active-campaign

Code Review | Send Data to AC

WordPress plugin Send Data to AC scored77%from 54 tests.

About plugin

  • Plugin page: send-cf7-data-to-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0
  • WordPress version: 6.3.1
  • First release: Jun 8, 2022
  • Latest release: Jun 8, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bitcraftx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.70ms] Passed 4 tests

An overview of server-side resources used by Send Data to AC
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.13 ▼0.89
Dashboard /wp-admin3.31 ▲0.0049.65 ▼1.09
Posts /wp-admin/edit.php3.36 ▲0.0045.40 ▼8.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.88 ▼8.36
Media Library /wp-admin/upload.php3.23 ▲0.0038.77 ▼0.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Send Data to AC
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.17 ▼0.411.82 ▼0.0647.71 ▲5.86
Dashboard /wp-admin2,189 ▲155.63 ▲0.0798.89 ▲9.3543.97 ▼0.52
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0536.25 ▼3.3633.54 ▼3.10
Add New Post /wp-admin/post-new.php1,526 ▼223.01 ▼0.06702.37 ▲5.1251.93 ▼10.02
Media Library /wp-admin/upload.php1,403 ▲34.10 ▼0.13103.78 ▼11.4344.40 ▼5.07

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/examples.php
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Campaign.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Account.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Form.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Automation.class.php:3
    • > PHP Warning
      Use of undefined constant CF7_DATA_TO_AC_PATH - assumed 'CF7_DATA_TO_AC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/send-cf7-data-to-active-campaign/includes/class.cf7-to-ac.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/examples-composer/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/send-cf7-data-to-active-campaign/templates/ac-tab-cf-7.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Webhook.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/Deal.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/send-cf7-data-to-active-campaign/vendor/activecampaign/api-php/includes/User.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid url: "..."
You can take inspiration from this readme.txt

send-cf7-data-to-active-campaign/CF7-Contact-To-Active-Campaign.php 77% from 13 tests

Analyzing the main PHP file in "Send Data to AC" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("send-cf7-data-to-active-campaign.php" instead of "CF7-Contact-To-Active-Campaign.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,856 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP385495732,547
JavaScript151157
JSON400110
Markdown135042

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.44
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods211
▷ Static methods188.53%
▷ Public methods20999.05%
▷ Protected methods00.00%
▷ Private methods20.95%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.28MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png7.87KB3.60KB▼ 54.29%
assets/banner-1544x500.png89.54KB29.10KB▼ 67.50%
assets/banner-772x250.png62.42KB17.76KB▼ 71.54%
assets/screenshot-1.png108.81KB34.93KB▼ 67.89%
assets/icon-256x256.png17.83KB6.49KB▼ 63.62%