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(i>item_count) {
                                i = i%item_count;
                                iterator = i;
                                j_filmstrip.css('left','-'+((f_frame_width+opts.frame_gap)*i)+'px');
                            } else if (i<=(item_count-strip_size)) {
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 172..180

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

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(i>item_count) {
                                i = i%item_count;
                                iterator = i;
                                j_filmstrip.css('top','-'+((f_frame_height+opts.frame_gap)*i)+'px');
                            } else if (i<=(item_count-strip_size)) {
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 129..137

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

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

            onload = (function( self, callback, src ) {

                return function() {

                    var complete = function() {
Severity: Minor
Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

    Function onThumbLoad has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                onThumbLoad = function( thumb, callback ) {
    
                    // scale when ready
                    thumb.scale({
                        width:    thumb.data.width,
    Severity: Minor
    Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

      Function onThumbLoad has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  onThumbLoad = function( thumb, callback ) {
      
                      // scale when ready
                      thumb.scale({
                          width:    thumb.data.width,
      Severity: Minor
      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

        Function onload has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    onload = (function( self, callback, src ) {
        
                        return function() {
        
                            var complete = function() {
        Severity: Minor
        Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

          Function tipsy has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $.fn.tipsy = function(options) {
          
                  if (options === true) {
                      return this.data('tipsy');
                  } else if (typeof options == 'string') {
          Severity: Minor
          Found in assets/js/ml-slider/assets/tipsy/jquery.tipsy.js - About 1 hr to fix

            Method addLocalPhoto has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function addLocalPhoto(
                    $catId,
                    $dirtyPhotoName,
                    $photoTitle = '',
                    $photoDesc = '',
            Severity: Minor
            Found in class/PhotoHandler.php - About 1 hr to fix

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

                  proxy : function( fn, scope ) {
                      if ( typeof fn !== 'function' ) {
                          return F;
                      }
                      scope = scope || this;
              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 4418..4426

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

              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

                  proxy : function( fn, scope ) {
                      if ( typeof fn !== 'function' ) {
                          return F;
                      }
                      scope = scope || this;
              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 4400..4408

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

              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 (currentIndex > 0) {
                              href = currentArray[ currentIndex - 1 ].href;
              
                              if (typeof href !== 'undefined' && href.match(imgRegExp)) {
                                  objNext = new Image();
              Severity: Major
              Found in assets/js/fancybox/fancybox.js and 1 other location - About 1 hr to fix
              assets/js/fancybox/fancybox.js on lines 633..640

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

              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 ((currentArray.length -1) > currentIndex) {
                              href = currentArray[ currentIndex + 1 ].href;
              
                              if (typeof href !== 'undefined' && href.match(imgRegExp)) {
                                  objNext = new Image();
              Severity: Major
              Found in assets/js/fancybox/fancybox.js and 1 other location - About 1 hr to fix
              assets/js/fancybox/fancybox.js on lines 642..649

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

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

                  function appendHTML() {
                      if (!$box && document.body) {
                          init = false;
                          $window = $(window);
                          $box = $tag(div).attr({
              Severity: Minor
              Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js - About 1 hr to fix

                Method get_easing_options has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function get_easing_options()
                    {
                        $options = [
                            'linear',
                            'swing',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php - About 1 hr to fix

                  Method checkVerModule has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function checkVerModule($helper, $source = 'github', $default = 'master')
                      {
                          $moduleDirName      = \basename(\dirname(__DIR__, 2));
                          $moduleDirNameUpper = mb_strtoupper($moduleDirName);
                          $update             = '';
                  Severity: Minor
                  Found in class/Common/VersionChecks.php - About 1 hr to fix

                    Avoid excessively long variable names like $btCacheBlockOutputOnPost. Keep variable name length under 20.
                    Open

                        protected $btCacheBlockOutputOnPost             = true;

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    Avoid excessively long variable names like $btCacheBlockOutputForRegisteredUsers. Keep variable name length under 20.
                    Open

                        protected $btCacheBlockOutputForRegisteredUsers = true;

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    Avoid excessively long variable names like $closest_marker_position. Keep variable name length under 20.
                    Open

                                $closest_marker_position = null;

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    Avoid excessively long variable names like $btCacheBlockOutputLifetime. Keep variable name length under 20.
                    Open

                        protected $btCacheBlockOutputLifetime           = CACHE_LIFETIME;

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    Avoid excessively long variable names like $_supported_image_types. Keep variable name length under 20.
                    Open

                        public $_supported_image_types = [
                            'png' => 'rw',
                        ];

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    Severity
                    Category
                    Status
                    Source
                    Language