CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-content/themes/twentyfourteen/js/slider.js

Summary

Maintainability
F
4 days
Test Coverage

Function featuredslider has 434 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.featuredslider = function( el, options ) {
        var slider = $( el ),
            msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
            touch = ( ( 'ontouchstart' in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch ), // MSFT specific.
            eventType = 'click touchend MSPointerUp',
Severity: Major
Found in Web.Admin/2014/wordpress/wp-content/themes/twentyfourteen/js/slider.js - About 2 days to fix

    File slider.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Twenty Fourteen Featured Content Slider
     *
     * Adapted from FlexSlider v2.2.0, copyright 2012 WooThemes
     * @link http://www.woothemes.com/flexslider/

      Function touch has 124 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  touch: function() {
                      var startX,
                          startY,
                          offset,
                          cwidth,

        Function init has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    init: function() {
                        slider.animating = false;
                        slider.currentSlide = 0;
                        slider.animatingTo = slider.currentSlide;
                        slider.atEnd = ( slider.currentSlide === 0 || slider.currentSlide === slider.last );

          Function featureAnimate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  slider.featureAnimate = function( target ) {
                      if ( target !== slider.currentSlide ) {
                          slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev';
                      }
          
          

            Function setupPaging has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            setupPaging: function() {
                                var type = 'control-paging',
                                    j = 1,
                                    item,
                                    slide,

              There are no issues that match your filters.

              Category
              Status