mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function load has 107 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    load: function(src, size, callback) {

        if ( typeof size == 'function' ) {
            callback = size;
            size = null;
Severity: Major
Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

    Function _show has 107 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _show : function() {
    
            // shortcuts
            var self   = this,
                queue  = this._queue[ 0 ],
    Severity: Major
    Found in assets/js/galleria/galleria-1.1.js - About 4 hrs to fix

      Function load has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          load: function(src, size, callback) {
      
              if ( typeof size == 'function' ) {
                  callback = size;
                  size = null;
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js - About 4 hrs to fix

        Method _postProcess has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _postProcess($type, $quality)
            {
                array_unshift($this->command, $this->_prepare_cmd(IMAGE_TRANSFORM_NETPBM_PATH, mb_strtolower($this->type) . 'topnm', escapeshellarg($this->image)));
                $arg     = '';
                $type    = mb_strtolower($type);
        Severity: Major
        Found in class/pear/Image/Transform/Driver/NetPBM.php - About 4 hrs to fix

          Function _run has 106 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _run : function() {
                  // shortcuts
                  var self = this,
                      o = this._options,
          
          
          Severity: Major
          Found in assets/js/galleria/galleria-1.1.js - About 4 hrs to fix

            Function _show has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _show = function() {
                        var pos, equal;
            
                        loading.hide();
            
            
            Severity: Major
            Found in assets/js/fancybox/fancybox.js - About 4 hrs to fix

              File metaslider.class.php has 337 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              /**
               * Generic Slider super class. Extended by library specific classes.
               *
              Severity: Minor
              Found in assets/js/ml-slider/inc/slider/metaslider.class.php - About 4 hrs to fix

                Function loadContent has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function loadContent( $sldr, start, end, opts )
                    {
                        $sldr.children().slice( start, end ).each(
                            function()
                            {
                Severity: Major
                Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 4 hrs to fix

                  Function _run has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _run : function() {
                  
                          var self = this;
                  
                          self._createThumbnails();
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.3.3.js - About 3 hrs to fix

                    Function _run has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _run : function() {
                    
                            var self = this;
                    
                            self._createThumbnails();
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

                      Function render_admin_page has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function render_admin_page()
                          {
                              $this->admin_process();
                              $this->go_pro_cta();
                              $this->system_check();
                      Severity: Minor
                      Found in assets/js/ml-slider/ml-slider.php - About 3 hrs to fix

                      Cognitive Complexity

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

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

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

                      Further reading

                      File CategoryHandler.php has 329 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        Function buildPanels has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function buildPanels() {
                                    // If panel overlay content exists, add the necessary overlay background DIV
                                    // The overlay content and background are separate elements so the background's opacity isn't inherited by the content
                                    j_panels.each(function(i){
                                        if($('.panel-overlay',this).length>0) {
                        Severity: Major
                        Found in assets/js/galleryview/galleryview.js - About 3 hrs to fix

                          Function scale has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              scale: function( options ) {
                          
                                  // extend some defaults
                                  options = $.extend({
                                      width: 0,
                          Severity: Major
                          Found in assets/js/galleria/galleria-1.1.js - About 3 hrs to fix

                            `` has 31 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            {
                                def: 'easeOutQuad',
                                swing: function (x, t, b, c, d) {
                                    //alert(jQuery.easing.default);
                                    return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
                            Severity: Minor
                            Found in assets/js/galleryview/easing.js - About 3 hrs to fix

                              Function load has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function load () {
                                      var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
                              
                                      active = true;
                              
                              
                              Severity: Major
                              Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js - About 3 hrs to fix

                                Function doGetopt has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                                    {
                                        // in case you pass directly readPHPArgv() as the first arg
                                        if (PEAR::isError($args)) {
                                            return $args;
                                Severity: Minor
                                Found in class/pear/Console/Getopt.php - About 3 hrs to fix

                                Cognitive Complexity

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

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

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

                                Further reading

                                MetaSliderPlugin has 30 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class MetaSliderPlugin
                                {
                                    /** Current Slider **/
                                    public $slider = null;
                                
                                
                                Severity: Minor
                                Found in assets/js/ml-slider/ml-slider.php - About 3 hrs to fix

                                  Function microgallery has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      $.fn.microgallery = function(options) {
                                          var opts = $.extend({}, $.fn.microgallery.defaults, options);
                                          return this.each(function() {
                                              var $this = $(this);
                                              var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
                                  Severity: Major
                                  Found in assets/js/microgallery/jquery.microgallery.js - About 3 hrs to fix

                                    Function complete has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            var complete = (function( data, next, active, queue, thumb ) {
                                    
                                                return function() {
                                    
                                                    var win;
                                    Severity: Major
                                    Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language