mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

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

        if (is_dir($templateDirectory)) {
            $templateList = array_diff(scandir($templateDirectory, SCANDIR_SORT_NONE), ['..', '.']);
            foreach ($templateList as $k => $v) {
                $fileInfo = new \SplFileInfo($templateDirectory . $v);
                if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
Severity: Major
Found in include/onupdate.php and 2 other locations - About 2 hrs to fix
include/onupdate.php on lines 151..161
include/onupdate.php on lines 178..188

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

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

        if (is_dir($templateDirectory)) {
            $templateList = array_diff(scandir($templateDirectory, SCANDIR_SORT_NONE), ['..', '.']);
            foreach ($templateList as $k => $v) {
                $fileInfo = new \SplFileInfo($templateDirectory . $v);
                if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
Severity: Major
Found in include/onupdate.php and 2 other locations - About 2 hrs to fix
include/onupdate.php on lines 151..161
include/onupdate.php on lines 164..174

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

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

        if (is_dir($templateDirectory)) {
            $templateList = array_diff(scandir($templateDirectory, SCANDIR_SORT_NONE), ['..', '.']);
            foreach ($templateList as $k => $v) {
                $fileInfo = new \SplFileInfo($templateDirectory . $v);
                if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
Severity: Major
Found in include/onupdate.php and 2 other locations - About 2 hrs to fix
include/onupdate.php on lines 164..174
include/onupdate.php on lines 178..188

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

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

PhpCaptcha has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

class PhpCaptcha
{
    public $oImage;
    public $aFonts;
    public $iWidth;
Severity: Minor
Found in class/PhpCaptcha.php - About 2 hrs to fix

    Function loadCSS has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                loadCSS : function( href, id, callback ) {
    
                    var link,
                        length;
    
    
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix

      Function loadCSS has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  loadCSS : function( href, id, callback ) {
      
                      var link,
                          length;
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

        Function refresh has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    refresh: function() {
                        var imageData = this.currentImage;
                        if (!imageData)
                            return this;
        
        
        Severity: Major
        Found in assets/js/galleriffic/jquery.galleriffic.js - About 2 hrs to fix

          Method _get_image_details has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _get_image_details($image)
              {
                  $data = @getimagesize($image);
                  //  1 = GIF,   2 = JPG,  3 = PNG,  4 = SWF,  5 = PSD,  6 = BMP,
                  //  7 = TIFF (intel byte order),   8 = TIFF (motorola byte order),
          Severity: Major
          Found in class/pear/Image/Transform.php - About 2 hrs to fix

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

                        $.each(elems.split(' '), function( i, elemId ) {
                            self.addElement( 'lightbox-' + elemId );
                            el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId );
                        });
            Severity: Major
            Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.3.3.js on lines 2199..2202
            assets/js/galleria/galleria-1.3.5.js on lines 2209..2212

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

            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

                getMousePosition : function(e) {
                    return {
                        x: e.pageX - this.$( 'container' ).offset().left,
                        y: e.pageY - this.$( 'container' ).offset().top
                    };
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.1.js on lines 2235..2240
            assets/js/galleria/galleria-1.3.5.js on lines 4301..4306

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

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

                        $.each(elems.split(' '), function( i, elemId ) {
                            self.addElement( 'lightbox-' + elemId );
                            el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId );
                        });
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.1.js on lines 1183..1186
            assets/js/galleria/galleria-1.3.5.js on lines 2209..2212

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

            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

                getMousePosition : function(e) {
                    return {
                        x: e.pageX - this.$( 'stage' ).offset().left,
                        y: e.pageY - this.$( 'stage' ).offset().top
                    };
            Severity: Major
            Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.3.3.js on lines 4283..4288
            assets/js/galleria/galleria-1.3.5.js on lines 4301..4306

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

            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

                    $.each( Galleria.on.binds, function(i, bind) {
                        // check if already bound
                        if ( $.inArray( bind.hash, self._binds ) == -1 ) {
                            self.bind( bind.type, bind.callback );
                        }
            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 3131..3136

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

            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

                    $.each( Galleria.on.binds, function(i, bind) {
                        // check if already bound
                        if ( $.inArray( bind.hash, self._binds ) == -1 ) {
                            self.bind( bind.type, bind.callback );
                        }
            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 3113..3118

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

            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

                getMousePosition : function(e) {
                    return {
                        x: e.pageX - this.$( 'container' ).offset().left,
                        y: e.pageY - this.$( 'container' ).offset().top
                    };
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.1.js on lines 2235..2240
            assets/js/galleria/galleria-1.3.3.js on lines 4283..4288

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

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

                        $.each(elems.split(' '), function( i, elemId ) {
                            self.addElement( 'lightbox-' + elemId );
                            el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId );
                        });
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 2 hrs to fix
            assets/js/galleria/galleria-1.1.js on lines 1183..1186
            assets/js/galleria/galleria-1.3.3.js on lines 2199..2202

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

            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

                $.fn.tipsy.autoWE = function() {
                    return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
                };
            Severity: Major
            Found in assets/js/ml-slider/assets/tipsy/jquery.tipsy.js and 1 other location - About 2 hrs to fix
            assets/js/ml-slider/assets/tipsy/jquery.tipsy.js on lines 219..221

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

            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

                $.fn.tipsy.autoNS = function() {
                    return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
                };
            Severity: Major
            Found in assets/js/ml-slider/assets/tipsy/jquery.tipsy.js and 1 other location - About 2 hrs to fix
            assets/js/ml-slider/assets/tipsy/jquery.tipsy.js on lines 223..225

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

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

                    _process_title = function() {
                        titleStr = currentOpts.title || '';
                        titleHeight = 0;
            
                        title
            Severity: Major
            Found in assets/js/fancybox/fancybox.js - About 2 hrs to fix

              File pcltrace.lib.php has 261 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace XoopsModules\Extgallery;
              
              // --------------------------------------------------------------------------------
              Severity: Minor
              Found in class/pcltrace.lib.php - About 2 hrs to fix
                Severity
                Category
                Status
                Source
                Language