83% convertkit-for-woocommerce

Code Review | ConvertKit for WooCommerce

WordPress plugin ConvertKit for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: convertkit-for-wo...
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Nov 9, 2023
  • Number of updates: 47
  • Update frequency: every 58.1 days
  • Top authors: convertkit (72.34%)travisnorthcutt (14.89%)nathanbarry (14.89%)growdev (4.26%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /132,495 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.46MB] [CPU: ▲0.08ms] Passed 4 tests

Analyzing server-side resources used by ConvertKit for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4744.87 ▲2.15
Dashboard /wp-admin3.78 ▲0.4850.07 ▲0.02
Posts /wp-admin/edit.php3.84 ▲0.4748.07 ▼0.32
Add New Post /wp-admin/post-new.php6.30 ▲0.4196.52 ▼1.54
Media Library /wp-admin/upload.php3.71 ▲0.4738.70 ▲6.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ConvertKit for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.37 ▲0.021.84 ▼0.1641.62 ▼2.40
Dashboard /wp-admin2,195 ▲155.59 ▼0.0686.73 ▼15.1339.31 ▼6.26
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0139.27 ▼0.8936.12 ▲0.45
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▲0.08684.85 ▼2.3445.46 ▼12.46
Media Library /wp-admin/upload.php1,403 ▲34.30 ▲0.1396.29 ▼2.9540.81 ▼0.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/convertkit-for-woocommerce/views/backend/custom-field-dropdown-field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/convertkit-for-woocommerce/includes/class-ckwc-integration.php:16
    • > PHP Warning
      Use of undefined constant CKWC_PLUGIN_PATH - assumed 'CKWC_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/convertkit-for-woocommerce/views/backend/post-type/meta-box.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/convertkit-for-woocommerce/vendor/convertkit/convertkit-wordpress-libraries/src/views/review-request.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/convertkit-for-woocommerce/views/backend/settings/link-button.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CKWC_Resource' not found in wp-content/plugins/convertkit-for-woocommerce/includes/class-ckwc-resource-forms.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/convertkit-for-woocommerce/views/backend/post-type/disabled.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/convertkit-for-woocommerce/views/backend/settings/sync-past-orders.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/convertkit-for-woocommerce/views/backend/settings/subscription.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/convertkit-for-woocommerce/views/backend/settings/settings.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: woocommerce, email, convertkit, marketing, embed form...

convertkit-for-woocommerce/woocommerce-convertkit.php 77% from 13 tests

This is the main PHP file of "ConvertKit for WooCommerce" version 1.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("convertkit-for-woocommerce.php" instead of "woocommerce-convertkit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,798 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,2683,0373,286
JavaScript7137243353
CSS41023159

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.65
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods161
▷ Static methods10.62%
▷ Public methods12577.64%
▷ Protected methods00.00%
▷ Private methods3622.36%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin