mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

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

    load : function( source, selector, config ) {

        var self = this,
            o = this._options;

Severity: Major
Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 days to fix
assets/js/galleria/galleria-1.3.3.js on lines 3734..3843

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

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

(function ($) {

    /*global window, jQuery, Galleria */

    Galleria.addTheme({
Severity: Major
Found in assets/js/galleria/galleria.classic.js and 1 other location - About 5 days to fix
assets/js/galleria/themes/classic/galleria.classic.js on lines 10..100

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

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

(function ($) {

    /*global window, jQuery, Galleria */

    Galleria.addTheme({
Severity: Major
Found in assets/js/galleria/themes/classic/galleria.classic.js and 1 other location - About 5 days to fix
assets/js/galleria/galleria.classic.js on lines 10..100

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

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 pcltar.lib.php has 1744 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

// --------------------------------------------------------------------------------
// PhpConcept Library - Tar Module 1.3.1
// --------------------------------------------------------------------------------
Severity: Major
Found in class/pcltar.lib.php - About 4 days to fix

    File quarterly-home-slideshow.js has 1693 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var galleriaData = [
        {
            image: 'http://www.himalayanacademy.com/media/slideshows/2013/2013-06-21_hinduism-in-europe/hinduism-in-europe-2013_300.jpg',
            big: 'http://www.himalayanacademy.com/media/slideshows/2013/2013-06-21_hinduism-in-europe/big/hinduism-in-europe-2013_300.jpg',
            thumb: 'http://www.himalayanacademy.com/media/slideshows/2013/2013-06-21_hinduism-in-europe/thumb/hinduism-in-europe-2013_300.jpg',
    Severity: Major
    Found in assets/js/galleria/themes/classic/quarterly-home-slideshow.js - About 4 days to fix

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

          addPan : function( img ) {
      
              if ( this._options.imageCrop === false ) {
                  return;
              }
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 4298..4387

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

      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

          addPan : function( img ) {
      
              if ( this._options.imageCrop === false ) {
                  return;
              }
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 4316..4405

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

      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

              _exit: function( callback ) {
      
                  fullscreen.active = false;
      
                  var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 1886..1965

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

      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

              _exit: function( callback ) {
      
                  fullscreen.active = false;
      
                  var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 1891..1970

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

      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

          _parseData : function( callback ) {
      
              var self = this,
                  current,
                  ready = false,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 3864..3949

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

      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

          _parseData : function( callback ) {
      
              var self = this,
                  current,
                  ready = false,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 3846..3931

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

      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 Finger = function(elem, options) {
      
              // default options
              this.config = {
                  start: 0,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 6546..6623

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

      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 Finger = function(elem, options) {
      
              // default options
              this.config = {
                  start: 0,
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 6568..6645

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

      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

              this.bind( Galleria.DATA, function() {
      
                  // remove big if total pixels are less than 1024 (most phones)
                  if ( window.screen && window.screen.width && Array.prototype.forEach ) {
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 2716..2789

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

      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

              this.bind( Galleria.DATA, function() {
      
                  // remove big if total pixels are less than 1024 (most phones)
                  if ( window.screen && window.screen.width && Array.prototype.forEach ) {
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 4 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 2730..2803

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

      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

              next.load( src, function( next ) {
      
                  // add layer HTML
                  var layer = $( self._layers[ 1-self._controls.active ] ).html( data.layer || '' ).hide();
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 days to fix
      assets/js/galleria/galleria-1.3.3.js on lines 5053..5134

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

      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

              next.load( src, function( next ) {
      
                  // add layer HTML
                  var layer = $( self._layers[ 1-self._controls.active ] ).html( data.layer || '' ).hide();
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 3 days to fix
      assets/js/galleria/galleria-1.3.5.js on lines 5074..5155

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

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

          function PclTarHandleExtract(
              $p_tarname,
              $p_file_list,
              &$p_list_detail,
              $p_mode,
      Severity: Minor
      Found in class/pcltar.lib.php - About 3 days 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

      File jquery.magnific-popup.js has 1391 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! Magnific Popup - v0.9.9 - 2013-12-27
      * http://dimsemenov.com/plugins/magnific-popup/
      * Copyright (c) 2013 Dmitry Semenov; */
      ;(function($) {
      
      
      Severity: Major
      Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 3 days to fix

        Function galleryView has 720 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.galleryView = function(options) {
                var opts = $.extend($.fn.galleryView.defaults,options);
        
                var id;
                var iterator = 0;       // INT - Currently visible panel/frame
        Severity: Major
        Found in assets/js/galleryview/galleryview.js - About 3 days to fix
          Severity
          Category
          Status
          Source
          Language