mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

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

        addEvent : function() {
            idle.bound = true;
            self.$('container').on( 'mousemove click', idle.showAll );
            if ( self._options.idleMode == 'hover' ) {
                self.$('container').on( 'mouseleave', idle.hide );
Severity: Major
Found in assets/js/galleria/galleria-1.3.3.js and 3 other locations - About 2 hrs to fix
assets/js/galleria/galleria-1.3.3.js on lines 2042..2048
assets/js/galleria/galleria-1.3.5.js on lines 2039..2045
assets/js/galleria/galleria-1.3.5.js on lines 2047..2053

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

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

Method PclTarHandleReadHeader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function PclTarHandleReadHeader($v_binary_data, &$v_header)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
        $v_result = 1;

Severity: Major
Found in class/pcltar.lib.php - About 2 hrs to fix

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

                var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
                    image = this._controls.slides[index],
                    cached = image.isCached( src ),
                    thumb = this._thumbnails[ index ];
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 2 hrs to fix
    assets/js/galleria/galleria-1.3.5.js on lines 4814..4817

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

    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

            (function( can ) {
    
                if ( !( 'getContext' in can ) ) {
                    can = null;
                    return;
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 2 hrs to fix
    assets/js/galleria/galleria-1.3.5.js on lines 2716..2727

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

    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

                var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
                    image = this._controls.slides[index],
                    cached = image.isCached( src ),
                    thumb = this._thumbnails[ index ];
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
    assets/js/galleria/galleria-1.3.3.js on lines 4776..4779

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

    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

            (function( can ) {
                if ( !( 'getContext' in can ) ) {
                    can = null;
                    return;
                }
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
    assets/js/galleria/galleria-1.3.3.js on lines 2699..2713

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

    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 render has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        public function render()
        {
            // load all child ids for javascript codes
            foreach (\array_keys($this->_itemTree) as $item_id) {
                $this->_itemTree[$item_id]['allchild'] = [];
    Severity: Minor
    Found in class/GroupPermForm.php - About 2 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

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

            switch ($mode) {
                case PEAR_ERROR_EXCEPTION:
                case PEAR_ERROR_RETURN:
                case PEAR_ERROR_PRINT:
                case PEAR_ERROR_TRIGGER:
    Severity: Major
    Found in class/pear/PEAR.php and 2 other locations - About 2 hrs to fix
    class/pear/PEAR.php on lines 612..636
    class/pear/PEAR.php on lines 649..673

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

    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 3 locations. Consider refactoring.
    Open

            switch ($mode) {
                case PEAR_ERROR_EXCEPTION:
                case PEAR_ERROR_RETURN:
                case PEAR_ERROR_PRINT:
                case PEAR_ERROR_TRIGGER:
    Severity: Major
    Found in class/pear/PEAR.php and 2 other locations - About 2 hrs to fix
    class/pear/PEAR.php on lines 362..386
    class/pear/PEAR.php on lines 649..673

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

    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 3 locations. Consider refactoring.
    Open

            switch ($mode) {
                case PEAR_ERROR_EXCEPTION:
                case PEAR_ERROR_RETURN:
                case PEAR_ERROR_PRINT:
                case PEAR_ERROR_TRIGGER:
    Severity: Major
    Found in class/pear/PEAR.php and 2 other locations - About 2 hrs to fix
    class/pear/PEAR.php on lines 362..386
    class/pear/PEAR.php on lines 612..636

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

    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

    File PhpCaptcha.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace XoopsModules\Extgallery;
    
    /***************************************************************/
    Severity: Minor
    Found in class/PhpCaptcha.php - About 2 hrs to fix

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

                  var complete = function() {
      
                      self._layers[index].innerHTML = self.getData().layer || '';
      
                      self.trigger($.extend(evObj, {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 2 hrs to fix
      assets/js/galleria/galleria-1.3.5.js on lines 4834..4842

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

      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

                  var complete = function() {
      
                      self._layers[index].innerHTML = self.getData().layer || '';
      
                      self.trigger($.extend(evObj, {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
      assets/js/galleria/galleria-1.3.3.js on lines 4801..4809

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

      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

              function getHeight() {
                  settings.h = settings.h || $loaded.height();
                  settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
                  return settings.h;
              }
      Severity: Major
      Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js and 1 other location - About 2 hrs to fix
      assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js on lines 716..720

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

      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

              function getWidth() {
                  settings.w = settings.w || $loaded.width();
                  settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
                  return settings.w;
              }
      Severity: Major
      Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js and 1 other location - About 2 hrs to fix
      assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js on lines 721..725

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

      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

                          } elseif (preg_match($this->em_strong_regex[$closest_marker], $text, $matches)) {
                              $matches[2] = $this->parse_span_elements($matches[2], $markers);
      
                              $matches[1] and $matches[1] = $this->parse_span_elements($matches[1], $markers);
                              $matches[3] and $matches[3] = $this->parse_span_elements($matches[3], $markers);
      assets/js/magnific_popup/redaxo/magnific_popup/classes/class.parsedown.inc.php on lines 768..775

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

      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

                          } elseif ($text[1] === $closest_marker and preg_match($this->strong_em_regex[$closest_marker], $text, $matches)) {
                              $matches[2] = $this->parse_span_elements($matches[2], $markers);
      
                              $matches[1] and $matches[1] = $this->parse_span_elements($matches[1], $markers);
                              $matches[3] and $matches[3] = $this->parse_span_elements($matches[3], $markers);
      assets/js/magnific_popup/redaxo/magnific_popup/classes/class.parsedown.inc.php on lines 775..782

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

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

          addPan : function( img ) {
      
              if ( this._options.imageCrop === false ) {
                  return;
              }
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix

        Function addPan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            addPan : function( img ) {
        
                if ( this._options.imageCrop === false ) {
                    return;
                }
        Severity: Major
        Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

          Method truncateHtml has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
              {
                  if ($considerHtml) {
                      // if the plain text is shorter than the maximum length, return the whole text
                      if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
          Severity: Major
          Found in class/Common/SysUtility.php - About 2 hrs to fix
            Severity
            Category
            Status
            Source
            Language