mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

Consider simplifying this complex logical expression.
Open

            if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
                wo.uitheme_applied = true;
                oldtheme = themesAll[c.appliedTheme] || {};
                hasOldTheme = !$.isEmptyObject(oldtheme);
                oldremove =  hasOldTheme ? [ oldtheme.sortNone, oldtheme.sortDesc, oldtheme.sortAsc, oldtheme.active ].join( ' ' ) : '';
Severity: Critical
Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

    Function checkFilters has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            checkFilters: function( table, filter, skipFirst ) {
                var c = table.config,
                    wo = c.widgetOptions,
                    filterArray = $.isArray( filter ),
                    filters = ( filterArray ) ? filter : ts.getFilters( table, true ),
    Severity: Minor
    Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

      Function $headers has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
                      var configHeaders, header, column, template, tmp,
                          $elem = $( elem );
                      // ignore cell (don't add it to c.$headers) if row has ignoreRow class
                      if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
      Severity: Minor
      Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

        Function checkFilters has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                checkFilters: function( table, filter, skipFirst ) {
                    var c = table.config,
                        wo = c.widgetOptions,
                        filterArray = $.isArray( filter ),
                        filters = ( filterArray ) ? filter : ts.getFilters( table, true ),
        Severity: Minor
        Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 1 hr to fix

          Function $headers has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
                          var configHeaders, header, column, template, tmp,
                              $elem = $( elem );
                          // ignore cell (don't add it to c.$headers) if row has ignoreRow class
                          if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
          Severity: Minor
          Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 1 hr to fix

            Method adslight_search has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function adslight_search(
                $queryarray,
                $andor,
                $limit,
                $offset,
            Severity: Minor
            Found in include/search.inc.php - About 1 hr to fix

              Method reportAbuse has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function reportAbuse($lid): void
              {
                  global $xoopsConfig, $xoopsDB, $xoopsTheme;
                  $helper = Helper::getInstance();
                  require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
              Severity: Minor
              Found in report-abuse.php - About 1 hr to fix

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

                function sendFriend($lid): void
                {
                    global $xoopsDB, $xoopsTheme, $xoopsLogger;
                    $helper = Helper::getInstance();
                    $idd    = $idde = $iddee = '';
                Severity: Minor
                Found in sendfriend.php - About 1 hr to fix

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

                      public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = ''): void
                      {
                          if ('' === $sel_name) {
                              $sel_name = $this->id;
                          }
                  Severity: Minor
                  Found in class/Tree.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 onload has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      preloader.onload = function() {
                        var $preloader;
                        var imageHeight;
                        var imageWidth;
                        var maxImageHeight;
                  Severity: Minor
                  Found in assets/js/lightbox/js/lightbox.js - About 1 hr to fix

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

                        preloader.onload = function() {
                          var $preloader;
                          var imageHeight;
                          var imageWidth;
                          var maxImageHeight;
                    Severity: Minor
                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                        Lightbox.prototype.start = function($link) {
                          var self    = this;
                          var $window = $(window);
                      
                          $window.on('resize', $.proxy(this.sizeOverlay, this));
                      Severity: Minor
                      Found in assets/js/lightbox/js/lightbox.js - About 1 hr to fix

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

                        function addCombinator( matcher, combinator, base ) {
                            var dir = combinator.dir,
                                skip = combinator.next,
                                key = skip || dir,
                                checkNonElements = base && key === "parentNode",
                        Severity: Minor
                        Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                          function matcherFromTokens( tokens ) {
                              var checkContext, matcher, j,
                                  len = tokens.length,
                                  leadingRelative = Expr.relative[ tokens[0].type ],
                                  implicitRelative = leadingRelative || Expr.relative[" "],
                          Severity: Minor
                          Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                              Lightbox.prototype.start = function($link) {
                                var self    = this;
                                var $window = $(window);
                            
                                $window.on('resize', $.proxy(this.sizeOverlay, this));
                            Severity: Minor
                            Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                              tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                                  var matched, match, tokens, type,
                                      soFar, groups, preFilters,
                                      cached = tokenCache[ selector + " " ];
                              
                              
                              Severity: Minor
                              Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                select = Sizzle.select = function( selector, context, results, seed ) {
                                    var i, tokens, token, type, find,
                                        compiled = typeof selector === "function" && selector,
                                        match = !seed && tokenize( (selector = compiled.selector || selector) );
                                
                                
                                Severity: Minor
                                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                      public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = null)
                                      {
                                          global $pathIcon16;
                                          $moduleDirName      = \basename(\dirname(__DIR__, 2));
                                          $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
                                  Severity: Minor
                                  Found in class/Common/DirectoryChecker.php - About 1 hr to fix

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

                                        val: function( value ) {
                                            var hooks, ret, valueIsFunction,
                                                elem = this[ 0 ];
                                    
                                            if ( !arguments.length ) {
                                    Severity: Minor
                                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                              updateHeaderSortCount : function( c, list ) {
                                                  var col, dir, group, indx, primary, temp, val, order,
                                                      sortList = list || c.sortList,
                                                      len = sortList.length;
                                                  c.sortList = [];
                                      Severity: Minor
                                      Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language