mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function getBlockSelect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function getBlockSelect($selected = [])
    {
        $cats           = $this->getDescendants();
        $ret            = '<select name="options[]" multiple="multiple">';
        $selectedOption = '';
Severity: Minor
Found in class/CategoryHandler.php - About 55 mins 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 render has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function render()
    {
        $ele_name = $this->getName();
        echo '<table class="outer"><tr><td class="odd"><table><tr>';
        $cols = 1;
Severity: Minor
Found in class/GroupFormCheckBox.php - About 55 mins 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

Method PclTarHandleExtract has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $p_tarname,
        $p_file_list,
        &$p_list_detail,
        $p_mode,
        $p_path,
Severity: Major
Found in class/pcltar.lib.php - About 50 mins to fix

    Method isBlockCloned has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
    Severity: Major
    Found in admin/blocksadmin.php - About 50 mins to fix

      Method makeSelect has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function makeSelect($cats, $name, $selectMode, $addEmpty, $selected, $extra, $displayWeight)
      Severity: Major
      Found in class/CategoryHandler.php - About 50 mins to fix

        Method getSelect has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $name,
                $selectMode,
                $addEmpty = false,
                $selected = 0,
                $extra = '',
        Severity: Major
        Found in class/CategoryHandler.php - About 50 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                                  if ( type == 'image' && !current.big ) {
                                                      current.big = current.image;
                                                  }
          Severity: Major
          Found in assets/js/galleria/galleria-1.3.5.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                    if ( type == 'image' && !current.big ) {
                                                        current.big = current.image;
                                                    }
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for ( var fn in timers[label] ) {
                                          window.clearInterval(timers[label][fn]);
                                          delete timers[label][fn];
                                      }
              Severity: Major
              Found in assets/js/galleryview/timers.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if(el.is('img')) {
                                            el.attr('src', value);
                                        } else {
                                            el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
                                        }
                Severity: Major
                Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (cachedHash != undefined) {
                                          jQuery.historyCurrentHash = location.hash.replace(/\?.*$/, '');
                                          jQuery.historyCallback(cachedHash);
                                      }
                  Severity: Major
                  Found in assets/js/galleriffic/jquery.history.js - About 45 mins to fix

                    Function easeOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        easeOutBack: function (x, t, b, c, d, s) {
                    Severity: Minor
                    Found in assets/js/galleryview/easing.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if (historyDelta < 0) { // back button has been pushed
                                              // move items to forward stack
                                              for (var i = 0; i < Math.abs(historyDelta); i++) jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());
                                          } else { // forward button has been pushed
                                              // move items to back stack
                      Severity: Major
                      Found in assets/js/galleriffic/jquery.history.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( fn.timerID ) {
                                                    window.clearInterval(timers[label][fn.timerID]);
                                                    delete timers[label][fn.timerID];
                                                }
                        Severity: Major
                        Found in assets/js/galleryview/timers.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          } else if (jQuery.historyBackStack[jQuery.historyBackStack.length - 1] == undefined && !jQuery.isFirst) {
                                              // back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
                                              // document.URL doesn't change in Safari
                                              if (location.hash) {
                                                  var current_hash = location.hash;
                          Severity: Major
                          Found in assets/js/galleriffic/jquery.history.js - About 45 mins to fix

                            Function easeInOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                easeInOutBack: function (x, t, b, c, d, s) {
                            Severity: Minor
                            Found in assets/js/galleryview/easing.js - About 45 mins to fix

                              Function custom_media_upload_tab_name has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function custom_media_upload_tab_name($tabs)
                                  {
                                      $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
                              
                                      // restrict our tab changes to the meta slider plugin page
                              Severity: Minor
                              Found in assets/js/ml-slider/ml-slider.php - About 45 mins 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 easeInBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  easeInBack: function (x, t, b, c, d, s) {
                              Severity: Minor
                              Found in assets/js/galleryview/easing.js - About 45 mins to fix

                                Function historyInit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    historyInit: function(callback, src){
                                        jQuery.historyCallback = callback;
                                        if (src) jQuery.historyIframeSrc = src;
                                        var current_hash = location.hash.replace(/\?.*$/, '');
                                
                                
                                Severity: Minor
                                Found in assets/js/galleriffic/jquery.history.js - About 45 mins 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

                                Avoid deeply nested control flow statements.
                                Open

                                                            if(!opts.fade_panels) {
                                                                j_panels.hide().eq(i%item_count).show();
                                                            }
                                Severity: Major
                                Found in assets/js/galleryview/galleryview.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language