mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

Function initZoom has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initZoom: function() {
            var zoomSt = mfp.st.zoom,
                ns = '.zoom',
                image;

Severity: Major
Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 3 hrs to fix

    Method PclTarHandleHeader has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename)
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarHandleHeader', "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'");
            $v_result = 1;
    
    
    Severity: Major
    Found in class/pcltar.lib.php - About 3 hrs to fix

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

                      if ( !image.ready || $(image.image).attr('src') != src ) {
                          if ( data.iframe && !data.image ) {
                              image.isIframe = true;
                          }
                          image.load(src, function(image) {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
      assets/js/galleria/galleria-1.3.3.js on lines 4814..4829

      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 99.

      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

                      if ( !image.ready ) {
                          if ( data.iframe && !data.image ) {
                              image.isIframe = true;
                          }
                          image.load(src, function(image) {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 3 hrs to fix
      assets/js/galleria/galleria-1.3.5.js on lines 4849..4864

      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 99.

      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 success has 79 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  success: function() {
      
                      // save the instance
                      _galleries.push( self );
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js - About 3 hrs to fix

        Function success has 79 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    success: function() {
        
                        // save the instance
                        _galleries.push( self );
        
        
        Severity: Major
        Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

          File GD.php has 298 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /* vim: set expandtab tabstop=4 shiftwidth=4: */
          
          /**
          Severity: Minor
          Found in class/pear/Image/Transform/Driver/GD.php - About 3 hrs to fix

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

                splice : function() {
                    var self = this,
                        args = Utils.array( arguments );
                    window.setTimeout(function() {
                        protoArray.splice.apply( self._data, args );
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 3 hrs to fix
            assets/js/galleria/galleria-1.3.5.js on lines 3984..3994

            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 98.

            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

                splice : function() {
                    var self = this,
                        args = Utils.array( arguments );
                    window.setTimeout(function() {
                        protoArray.splice.apply( self._data, args );
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
            assets/js/galleria/galleria-1.3.3.js on lines 3966..3976

            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 98.

            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 show has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                show : function( index, rewind, _history ) {
            
                    var swipe = this._options.swipe;
            
                    // do nothing queue is long || index is false || queue is false and transition is in progress
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js - About 3 hrs to fix

              Function cat has a Cognitive Complexity of 22 (exceeds 5 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 3 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method PclTarHandleAddFile has 77 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)
                  {
                      TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddFile', "tar='$p_tar', filename='$p_filename', p_mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
                      $v_result = 1;
              
              
              Severity: Major
              Found in class/pcltar.lib.php - About 3 hrs to fix

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

                            if ( this.touching || M.abs(distance) <= 1 ) {
                                this.pos = this.to;
                                distance = 0;
                                if ( this.anim && !this.touching ) {
                                    this.config.oncomplete( this.index );
                Severity: Major
                Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                assets/js/galleria/galleria-1.3.3.js on lines 6740..6768

                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 96.

                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

                            if ( this.touching || M.abs(distance) <= 1 ) {
                                this.pos = this.to;
                                distance = 0;
                                if ( this.anim && !this.touching ) {
                                    this.config.oncomplete( this.index );
                Severity: Major
                Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 3 hrs to fix
                assets/js/galleria/galleria-1.3.5.js on lines 6762..6792

                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 96.

                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 getImage has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        getImage: function(item, template) {
                
                            var guard = 0,
                
                                // image load complete handler
                Severity: Major
                Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 3 hrs to fix

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

                      init: function( target, options ) {
                  
                          var self = this;
                  
                          // save the instance
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.1.js - About 3 hrs to fix

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

                        show : function( index, rewind, _history ) {
                    
                            var swipe = this._options.swipe;
                    
                            // do nothing queue is long || index is false || queue is false and transition is in progress
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

                      Function buildGallery has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function buildGallery() {
                                  var gallery_images = opts.show_filmstrip?$('img',j_frames):$('img',j_panels);
                                  // For each image in the gallery, add its original dimensions and scaled dimensions to the appropriate arrays for later reference
                                  gallery_images.each(function(i){
                                      img_h[i] = this.height;
                      Severity: Major
                      Found in assets/js/galleryview/galleryview.js - About 3 hrs to fix

                        Function dragSlide has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $.fn.TosRUs.dragSlide = function( $wrpr, _visible, _total )
                            {
                                var $sldr = $wrpr.find( '> .' + cls( 'slider' ) );
                        
                                var _distance = 0,
                        Severity: Major
                        Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 3 hrs to fix

                          Method xoops_module_install_extgallery has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function xoops_module_install_extgallery(\XoopsModule $module)
                          {
                              $module_id = $module->getVar('mid');
                              /** @var \XoopsGroupPermHandler $grouppermHandler */
                              $grouppermHandler = xoops_getHandler('groupperm');
                          Severity: Major
                          Found in include/install_function.php - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language