mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function addBindings has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function addBindings() {
        function clickHandler(e) {
            // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
            // See: http://jacklmoore.com/notes/click-events/
            if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
Severity: Minor
Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js - About 1 hr to fix

    Method get_admin_slide has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function get_admin_slide()
        {
            // get some slide settings
            $imageHelper = new MetaSliderImageHelper($this->slide->ID, 150, 150, 'false', $this->use_wp_image_editor());
            $thumb       = $imageHelper->get_image_url();
    Severity: Minor
    Found in assets/js/ml-slider/inc/slide/metaslide.image.class.php - About 1 hr to fix

      Method objectToArray has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function objectToArray($objects, $externalKeys = [], $format = 's')
          {
              static $cached;
      
              $ret = [];
      Severity: Minor
      Found in class/PersistableObjectHandler.php - About 1 hr to fix

        Function PclTarHandlerDirCheck has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            function PclTarHandlerDirCheck($p_dir)
            {
                $v_result = 1;
        
                TrFctStart(__FILE__, __LINE__, 'PclTarHandlerDirCheck', (string)$p_dir);
        Severity: Minor
        Found in class/pcltar.lib.php - About 1 hr 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

        Function init has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fancybox.init = function() {
                if ($("#fancybox-wrap").length) {
                    return;
                }
        
        
        Severity: Minor
        Found in assets/js/fancybox/fancybox.js - About 1 hr to fix

          Function addImage has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      addImage: function(listItem, thumbExists, insert, position) {
                          var $li = ( typeof listItem === "string" ) ? $(listItem) : listItem;
                          var $aThumb = $li.find('a.thumb');
                          var slideUrl = $aThumb.attr('href');
                          var title = $aThumb.attr('title');
          Severity: Minor
          Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 hr to fix

            Function historyCheck has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                historyCheck: function(){
                    // if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
                    if (jQuery.browser.msie) {
                        // On IE, check for location.hash of iframe
                        var ihistory = jQuery("#jQuery_history")[0];
            Severity: Minor
            Found in assets/js/galleriffic/jquery.history.js - About 1 hr to fix

              Function mfpFastClick has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $.fn.mfpFastClick = function(callback) {
              
                      return $(this).each(function() {
              
                          var elem = $(this),
              Severity: Minor
              Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 1 hr to fix

                Function show has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        show: function() {
                            var title = this.getTitle();
                            if (title && this.enabled) {
                                var $tip = this.tip();
                
                
                Severity: Minor
                Found in assets/js/ml-slider/assets/tipsy/jquery.tipsy.js - About 1 hr to fix

                  Method PclTarHandleExtractByIndexList has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function PclTarHandleExtractByIndexList(
                          $p_tarname,
                          $p_index_string,
                          &$p_list_detail,
                          $p_path,
                  Severity: Minor
                  Found in class/pcltar.lib.php - About 1 hr to fix

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

                        load : function( source, selector, config ) {
                    
                            var self = this;
                    
                            // empty the data array
                    Severity: Minor
                    Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                      Function build has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $.fn.build = function($this,o,mode,current,incfactor){
                                  $this.find('img').wrap('<div style="display:none"/>').show();
                                  switch(o.size){
                                      case 'small'    :
                                          $this.addClass('smallGallery');
                      Severity: Minor
                      Found in assets/js/microgallery/jquery.microgallery.js - About 1 hr to fix

                        Method form has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function form($instance)
                            {
                                $selected_slider = 0;
                                $title           = '';
                                $sliders         = false;
                        Severity: Minor
                        Found in assets/js/ml-slider/inc/metaslider.widget.class.php - About 1 hr to fix

                          Method cat has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function &cat($args)
                              {
                                  $ret   = null;
                                  $files = [];
                                  if (!is_array($args)) {
                          Severity: Minor
                          Found in class/pear/System.php - About 1 hr to fix

                            Function _slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    var _slide = function(params, complete, fade, door) {
                            
                                        var easing = this.getOptions('easing'),
                                            distance = this.getStageWidth(),
                                            from = { left: distance * ( params.rewind ? -1 : 1 ) },
                            Severity: Minor
                            Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                              Function _slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      var _slide = function(params, complete, fade, door) {
                              
                                          var easing = this.getOptions('easing'),
                                              distance = this.getStageWidth(),
                                              from = { left: distance * ( params.rewind ? -1 : 1 ) },
                              Severity: Minor
                              Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

                                Function buildPager has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            buildPager: function(pager) {
                                                var gallery = this;
                                                var numPages = this.getNumPages();
                                                var page = this.getCurrentPage();
                                                var startIndex = page * this.numThumbs;
                                Severity: Minor
                                Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 hr to fix

                                  Method toString has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function toString()
                                      {
                                          $modes  = [];
                                          $levels = [
                                              E_USER_NOTICE  => 'notice',
                                  Severity: Minor
                                  Found in class/pear/PEAR.php - About 1 hr to fix

                                    Method _createImage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function _createImage($width = -1, $height = -1, $trueColor = null)
                                        {
                                            if (-1 == $width) {
                                                $width = $this->new_x;
                                            }
                                    Severity: Minor
                                    Found in class/pear/Image/Transform/Driver/GD.php - About 1 hr to fix

                                      Method mkDir has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function mkDir($args)
                                          {
                                              $opts = self::_parseArgs($args, 'pm:');
                                              if (PEAR::isError($opts)) {
                                                  return self::raiseError($opts);
                                      Severity: Minor
                                      Found in class/pear/System.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language