XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Function send has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                send: function( headers, complete ) {
                    var i,
                        xhr = options.xhr(),
                        id = ++xhrId;

Severity: Major
Found in phpsysinfo/js/jQuery/jquery.js - About 2 hrs to fix

    Method adminmenu has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function adminmenu($currentoption = 0, $breadcrumb = '')
    {
        global $xoopsModule, $xoopsConfig, $modversion;
    
        /* Nice buttons styles */
    Severity: Major
    Found in modules/xoopsinfo/include/functions.php - About 2 hrs to fix

      Function filesystemtable has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function filesystemtable() {
          var html = "";
          html += "<h2>" + genlang(30) + "</h2>\n";
          html += "        <div style=\"overflow-x:auto;\">\n";
          html += "          <table id=\"filesystemTable\" style=\"border-collapse:collapse;\">\n";
      Severity: Major
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

        Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                superMatcher = function( seed, context, xml, results, outermost ) {
                    var elem, j, matcher,
                        matchedCount = 0,
                        i = "0",
                        unmatched = seed && [],
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.js - About 2 hrs to fix

          File html5shiv-printshiv.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
          * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
          */
          ;(function(window, document) {
          /*jshint evil:true */
          Severity: Minor
          Found in phpsysinfo/js/vendor/html5shiv-printshiv.js - About 2 hrs to fix

            File mysqlinfo.php has 275 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            declare(strict_types=1);
            
            /**
            Severity: Minor
            Found in modules/xoopsinfo/admin/mysqlinfo.php - About 2 hrs to fix

              Function _other has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function _other()
                  {
                      $sname = '';
                      foreach ($this->_lines as $line) {
                          if ((trim($line) !== "") && (strpos($line, ':') === false)) {
              Severity: Minor
              Found in phpsysinfo/includes/mb/class.lmsensors.inc.php - About 2 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

              Function _processes has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function _processes()
                  {
                      $process = glob('/proc/*/status', GLOB_NOSORT);
                      if (is_array($process) && (($total = count($process)) > 0)) {
                          $processes['*'] = 0;
              Severity: Minor
              Found in phpsysinfo/includes/os/class.Linux.inc.php - About 2 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

              Function memory has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function memory()
                  {
                      if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                          // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                          // I should probably add some version checking here, but for now
              Severity: Minor
              Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 2 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

              Function _processes has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function _processes()
                  {
                      if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                          $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                          $processes['*'] = 0;
              Severity: Minor
              Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 2 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

              Function _processes has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function _processes()
                  {
                      if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                          $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                          $processes['*'] = 0;
              Severity: Minor
              Found in phpsysinfo/includes/os/class.Darwin.inc.php - About 2 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

              Function readReg has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static function readReg($reg, $strName, &$strBuffer, $booErrorRep = true)
                  {
                      $strBuffer = '';
                      if ($reg === false) {
                          $last = strrpos($strName, "\\");
              Severity: Minor
              Found in phpsysinfo/includes/class.CommonFunctions.inc.php - About 2 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

              Function _parse_log_file has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  private static function _parse_log_file($string)
                  {
                      if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
                          $log_file = substr(PSI_LOG, 1);
                          if (file_exists($log_file)) {
              Severity: Minor
              Found in phpsysinfo/includes/class.CommonFunctions.inc.php - About 2 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

              Function uninstall_MimeTypes has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              function uninstall_MimeTypes($dirname = '')
              {
                  include_once(XOOPS_ROOT_PATH . '/kernel/mimetypes.php');
              
                  $hModule = xoops_getHandler('module');
              Severity: Minor
              Found in modules/xoopsinfo/include/mimetypes.php - About 2 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 class.Haiku.inc.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Haiku System Class
               *
               * PHP version 5
              Severity: Minor
              Found in phpsysinfo/includes/os/class.Haiku.inc.php - About 2 hrs to fix

                File uploader.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                // $Id: uploader.php 507 2006-05-26 23:39:35Z skalpa $
                //  ------------------------------------------------------------------------ //
                //                XOOPS - PHP Content Management System                      //
                //                    Copyright (c) 2000 XOOPS.org                           //
                Severity: Minor
                Found in class/uploader.php - About 2 hrs to fix

                  Function render has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          render:         function( notification ) {
                              var self = this;
                              var message = notification.message;
                              var o = notification.options;
                  
                  
                  Severity: Major
                  Found in phpsysinfo/js/jQuery/jquery.jgrowl.js - About 2 hrs to fix

                    Function ps_buildTable has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ps_buildTable(xml) {
                        var html = "", tree = [], closed = [], memwas = false, cpuwas = false;
                    
                        $("#Plugin_PS #Plugin_PSTable").remove();
                    
                    
                    Severity: Major
                    Found in phpsysinfo/plugins/ps/js/ps.js - About 2 hrs to fix

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

                          init = jQuery.fn.init = function( selector, context, root ) {
                              var match, elem;
                      
                              // HANDLE: $(""), $(null), $(undefined), $(false)
                              if ( !selector ) {
                      Severity: Major
                      Found in phpsysinfo/js/jQuery/jquery.js - About 2 hrs to fix

                        Function domManip has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function domManip( collection, args, callback, ignored ) {
                        
                            // Flatten any nested arrays
                            args = concat.apply( [], args );
                        
                        
                        Severity: Major
                        Found in phpsysinfo/js/jQuery/jquery.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language