woothemes/woocommerce

View on GitHub
includes/tracks/class-wc-site-tracking.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method init has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function init() {

        // Define window.wcTracks.recordEvent in case it is enabled client-side.
        self::register_scripts();
        add_filter( 'admin_footer', array( __CLASS__, 'add_tracking_function' ), 24 );
Severity: Minor
Found in includes/tracks/class-wc-site-tracking.php - About 1 hr to fix

    Method add_enable_tracking_function has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function add_enable_tracking_function() {
            global $wp_scripts;
    
            if ( ! isset( $wp_scripts->registered['woo-tracks'] ) ) {
                return;
    Severity: Minor
    Found in includes/tracks/class-wc-site-tracking.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status