62% sitepact-klaviyo-contact-form-7

Code Review | Sitepact's Contact Form 7 Extension For Klaviyo

WordPress plugin Sitepact's Contact Form 7 Extension For Klaviyo scored62%from 54 tests.

About plugin

  • Plugin page: sitepact-klaviyo-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.3
  • WordPress version: 6.3.1
  • First release: Feb 12, 2021
  • Latest release: Nov 4, 2022
  • Number of updates: 11
  • Update frequency: every 57.6 days
  • Top authors: sitepact (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /3,433 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.06ms] Passed 4 tests

Server-side resources used by Sitepact's Contact Form 7 Extension For Klaviyo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.04 ▼1.67
Dashboard /wp-admin3.42 ▲0.1245.69 ▼6.79
Posts /wp-admin/edit.php3.54 ▲0.1844.09 ▼5.88
Add New Post /wp-admin/post-new.php6.00 ▲0.1281.90 ▼17.88
Media Library /wp-admin/upload.php3.35 ▲0.1237.69 ▲5.65
Klaviyo Log /wp-admin/admin.php?page=klaviyo-contact-form-7-log3.3233.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp__klcf_new_logs
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Sitepact's Contact Form 7 Extension For Klaviyo: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.021.73 ▲0.1739.79 ▲1.24
Dashboard /wp-admin2,198 ▲175.64 ▼0.0986.75 ▼15.0838.78 ▼4.68
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0335.17 ▼0.8034.09 ▼4.17
Add New Post /wp-admin/post-new.php1,526 ▼1222.90 ▼0.00662.68 ▼12.5451.02 ▼2.40
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0393.66 ▼5.6243.73 ▼1.32
Klaviyo Log /wp-admin/admin.php?page=klaviyo-contact-form-7-log9282.0124.6027.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp__klcf_new_logs
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/list-log.php:9
    • > PHP Notice
      Undefined variable: pro_link in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 317
    • > PHP Notice
      Undefined variable: map_extra_fields in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 537
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 332
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/sitepact-klaviyo-contact-form-7/includes/list_table.php:2
    • > PHP Notice
      Undefined variable: checked in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 323
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 314
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/log_view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/log_view.php:4
    • > PHP Warning
      array_filter() expects parameter 1 to be array, null given in wp-content/plugins/sitepact-klaviyo-contact-form-7/templates/intregation-form.php on line 537

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=klaviyo-contact-form-7-log
    • > Network (severe)
    wp-content/plugins/sitepact-klaviyo-contact-form-7/includes/assets/js/jquery.dataTables.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 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
6 plugin tags: newsletter, klaviyo, audiences, cf7, contact form 7...

sitepact-klaviyo-contact-form-7/KLCF_Klaviyo-Contact-Form-7.php 92% from 13 tests

The primary PHP file in "Sitepact's Contact Form 7 Extension For Klaviyo" version 1.0.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sitepact-klaviyo-contact-form-7.php" instead of "KLCF_Klaviyo-Contact-Form-7.php")

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 detected3,277 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS2102,041
PHP6292871,230
JavaScript1145
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.00
▷ Minimum class complexity4.00
▷ Maximum class complexity47.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3794.87%
▷ Protected methods00.00%
▷ Private methods25.13%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin