mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

File lightbox-plus-jquery.js has 7169 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 3 wks to fix

    File jquery.tablesorter.combined.js has 4916 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*! tablesorter (FORK) - updated 2020-03-03 (v2.31.3)*/
    /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
    (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery) {
    /*! TableSorter (FORK) v2.31.3 *//*
    * Client-side table sorting with ease!
    Severity: Major
    Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 wks to fix

      Function Sizzle has 1459 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      (function( window ) {
      
      var i,
          support,
          Expr,
      Severity: Major
      Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 wk to fix

        File jquery.tablesorter.widgets.js has 2568 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*! tablesorter (FORK) - updated 2020-03-03 (v2.31.3)*/
        /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
        (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery) {
        /*! Widget: storage - updated 2018-03-18 (v2.30.0) */
        /*global JSON:false */
        Severity: Major
        Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 1 wk to fix

          File jquery.tablesorter.js has 2350 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
          /*! TableSorter (FORK) v2.31.3 *//*
          * Client-side table sorting with ease!
          * @requires jQuery v1.2.6+
          *
          Severity: Major
          Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 6 days to fix

            Function adsView has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
            Open

            function adsView($cid, $min, $orderby, $show = 0): void
            {
                global $xoopsDB, $xoopsTpl, $xoopsConfig, $myts, $mytree, $imagecat, $meta, $mid, $prem_perm, $xoopsModule;
            
                $helper     = Helper::getInstance();
            Severity: Minor
            Found in viewcats.php - About 2 days 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 index has a Cognitive Complexity of 134 (exceeds 5 allowed). Consider refactoring.
            Open

            function index(): void
            {
                global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $mytree, $meta, $mid, $prem_perm;
                $pathIcon16    = Admin::iconUrl('', '16');
                $moduleDirName = \basename(__DIR__);
            Severity: Minor
            Found in index.php - About 2 days 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 viewAds has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
            Open

            function viewAds($lid = 0): void
            {
                global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsTpl, $myts, $meta, $prem_perm, $xoopsUser;
            
                $helper = Helper::getInstance();
            Severity: Minor
            Found in viewads.php - About 2 days 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 viewAds has 393 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function viewAds($lid = 0): void
            {
                global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsTpl, $myts, $meta, $prem_perm, $xoopsUser;
            
                $helper = Helper::getInstance();
            Severity: Major
            Found in viewads.php - About 1 day to fix

              File validate_ads.php has 760 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php declare(strict_types=1);
              
              /*
               * You may not change or alter any portion of this comment or credits
               * of supporting developers from this source code or any supporting source code
              Severity: Major
              Found in admin/validate_ads.php - About 1 day to fix

                Function modifyAd has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
                Open

                function modifyAd($lid): void
                {
                    global $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
                    $contactselect = '';
                    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
                Severity: Minor
                Found in modify.php - About 1 day 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 view_ads.php has 724 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php declare(strict_types=1);
                
                /*
                 * You may not change or alter any portion of this comment or credits
                 * of supporting developers from this source code or any supporting source code
                Severity: Major
                Found in admin/view_ads.php - About 1 day to fix

                  File xoops_version.php has 724 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php declare(strict_types=1);
                  /*
                   * You may not change or alter any portion of this comment or credits
                   * of supporting developers from this source code or any supporting source code
                   * which is considered copyrighted (c) material of the original comment or credit authors.
                  Severity: Major
                  Found in xoops_version.php - About 1 day to fix

                    Method adsView has 319 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function adsView($cid, $min, $orderby, $show = 0): void
                    {
                        global $xoopsDB, $xoopsTpl, $xoopsConfig, $myts, $mytree, $imagecat, $meta, $mid, $prem_perm, $xoopsModule;
                    
                        $helper     = Helper::getInstance();
                    Severity: Major
                    Found in viewcats.php - About 1 day to fix

                      Method index has 260 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function index(): void
                      {
                          global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $mytree, $meta, $mid, $prem_perm;
                          $pathIcon16    = Admin::iconUrl('', '16');
                          $moduleDirName = \basename(__DIR__);
                      Severity: Major
                      Found in index.php - About 1 day to fix

                        Function ajax has 253 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            ajax: function( url, options ) {
                        
                                // If url is an object, simulate pre-1.5 signature
                                if ( typeof url === "object" ) {
                                    options = url;
                        Severity: Major
                        Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 day to fix

                          File Utility.php has 585 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php declare(strict_types=1);
                          
                          namespace XoopsModules\Adslight;
                          
                          /*
                          Severity: Major
                          Found in class/Utility.php - About 1 day to fix

                            Function setDocument has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            setDocument = Sizzle.setDocument = function( node ) {
                                var hasCompare, subWindow,
                                    doc = node ? node.ownerDocument || node : preferredDoc;
                            
                                // Return early if doc is invalid or already selected
                            Severity: Major
                            Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 day to fix

                              File Blocksadmin.php has 554 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php declare(strict_types=1);
                              
                              namespace XoopsModules\Adslight\Common;
                              
                              /**
                              Severity: Major
                              Found in class/Common/Blocksadmin.php - About 1 day to fix

                                Method modifyAd has 223 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function modifyAd($lid): void
                                {
                                    global $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
                                    $contactselect = '';
                                    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
                                Severity: Major
                                Found in modify.php - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language