mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        if(opts.show_panels && !opts.show_filmstrip && !panel_nav_displayed) {
                            $('.nav-next-overlay').fadeIn('fast');
                            $('.nav-prev-overlay').fadeIn('fast');
                            $('.nav-next',j_gallery).fadeIn('fast');
                            $('.nav-prev',j_gallery).fadeIn('fast');
Severity: Major
Found in assets/js/galleryview/galleryview.js and 1 other location - About 1 hr to fix
assets/js/galleryview/galleryview.js on lines 791..797

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    $.fancybox.init = function() {
        if ($("#fancybox-wrap").length) {
            return;
        }

Severity: Minor
Found in assets/js/fancybox/fancybox.js - About 1 hr to fix

    Function addImage has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                addImage: function(listItem, thumbExists, insert, position) {
                    var $li = ( typeof listItem === "string" ) ? $(listItem) : listItem;
                    var $aThumb = $li.find('a.thumb');
                    var slideUrl = $aThumb.attr('href');
                    var title = $aThumb.attr('title');
    Severity: Minor
    Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 hr to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      Galleria.run = function( selector, options ) {
          if ( $.isFunction( options ) ) {
              options = { extend: options };
          }
          $( selector || '#galleria' ).galleria( options );
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.5.js on lines 5865..5871

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      Galleria.run = function( selector, options ) {
          if ( $.isFunction( options ) ) {
              options = { extend: options };
          }
          $( selector || '#galleria' ).galleria( options );
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.3.js on lines 5844..5850

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              if ( opts.next.button )
              {
                  $next = ( opts.next.button instanceof $ )
                      ? opts.next.button
                      : $('<a class="' + cls( 'next' ) + '" href="#" />').appendTo( $wrpr );
      Severity: Major
      Found in assets/js/TosRUs/src/js/jquery.tosrus.js and 1 other location - About 1 hr to fix
      assets/js/TosRUs/src/js/jquery.tosrus.js on lines 88..93

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt(that.style.width,10) - interfaceWidth)+'px';
      Severity: Major
      Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js and 1 other location - About 1 hr to fix
      assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js on lines 619..619

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt(that.style.height,10) - interfaceHeight)+'px';
      Severity: Major
      Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js and 1 other location - About 1 hr to fix
      assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js on lines 618..618

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if(filmstrip_orientation=='horizontal') {
                      if(slide_method == 'pointer') {strip_width = (f_frame_width*item_count)+(opts.frame_gap*(item_count));}
                      else {strip_width = (f_frame_width*item_count*3)+(opts.frame_gap*(item_count*3));}
                  } else {
      Severity: Major
      Found in assets/js/galleryview/galleryview.js and 1 other location - About 1 hr to fix
      assets/js/galleryview/galleryview.js on lines 961..964

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              if ( opts.prev.button )
              {
                  $prev = ( opts.prev.button instanceof $ )
                      ? opts.prev.button
                      : $('<a class="' + cls( 'prev' ) + '" href="#" />').appendTo( $wrpr );
      Severity: Major
      Found in assets/js/TosRUs/src/js/jquery.tosrus.js and 1 other location - About 1 hr to fix
      assets/js/TosRUs/src/js/jquery.tosrus.js on lines 94..99

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  } else {
                      if(slide_method == 'pointer') {strip_height = (f_frame_height*item_count+opts.frame_gap*(item_count));}
                      else {strip_height = (f_frame_height*item_count*3)+(opts.frame_gap*(item_count*3));}
                  }
      Severity: Major
      Found in assets/js/galleryview/galleryview.js and 1 other location - About 1 hr to fix
      assets/js/galleryview/galleryview.js on lines 953..956

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function historyCheck has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          historyCheck: function(){
              // if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
              if (jQuery.browser.msie) {
                  // On IE, check for location.hash of iframe
                  var ihistory = jQuery("#jQuery_history")[0];
      Severity: Minor
      Found in assets/js/galleriffic/jquery.history.js - About 1 hr to fix

        Function mfpFastClick has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.mfpFastClick = function(callback) {
        
                return $(this).each(function() {
        
                    var elem = $(this),
        Severity: Minor
        Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 1 hr to fix

          Function show has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  show: function() {
                      var title = this.getTitle();
                      if (title && this.enabled) {
                          var $tip = this.tip();
          
          
          Severity: Minor
          Found in assets/js/ml-slider/assets/tipsy/jquery.tipsy.js - About 1 hr to fix

            Method PclTarHandleExtractByIndexList has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function PclTarHandleExtractByIndexList(
                    $p_tarname,
                    $p_index_string,
                    &$p_list_detail,
                    $p_path,
            Severity: Minor
            Found in class/pcltar.lib.php - About 1 hr to fix

              Function load has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  load : function( source, selector, config ) {
              
                      var self = this;
              
                      // empty the data array
              Severity: Minor
              Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                Function build has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $.fn.build = function($this,o,mode,current,incfactor){
                            $this.find('img').wrap('<div style="display:none"/>').show();
                            switch(o.size){
                                case 'small'    :
                                    $this.addClass('smallGallery');
                Severity: Minor
                Found in assets/js/microgallery/jquery.microgallery.js - About 1 hr to fix

                  Method form has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function form($instance)
                      {
                          $selected_slider = 0;
                          $title           = '';
                          $sliders         = false;
                  Severity: Minor
                  Found in assets/js/ml-slider/inc/metaslider.widget.class.php - About 1 hr to fix

                    Method cat has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function &cat($args)
                        {
                            $ret   = null;
                            $files = [];
                            if (!is_array($args)) {
                    Severity: Minor
                    Found in class/pear/System.php - About 1 hr to fix

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                          play : function( delay ) {
                      
                              this._playing = true;
                      
                              this._playtime = delay || this._playtime;
                      Severity: Major
                      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
                      assets/js/galleria/galleria-1.3.5.js on lines 5318..5329

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 71.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language