XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Method _filesystems has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function _filesystems()
    {
        $notwas = true;
        if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
            $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
Severity: Major
Found in phpsysinfo/includes/os/class.Android.inc.php - About 2 hrs to fix

    WINNT has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class WINNT extends OS
    {
        /**
         * holds the data from WMI Win32_OperatingSystem
         *
    Severity: Minor
    Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

      JavaScriptPacker has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class JavaScriptPacker
      {
          // constants
          const IGNORE = '$1';
      
      
      Severity: Minor
      Found in phpsysinfo/includes/js/class.JavaScriptPacker.inc.php - About 2 hrs to fix

        Function Deferred has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Deferred: function( func ) {
                var tuples = [
        
                        // action, add listener, listener list, final state
                        [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.js - About 2 hrs to fix

          Method ide has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function ide()
              {
                  foreach ($this->readdmesg() as $line) {
                      if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                          $dev = new HWDevice();
          Severity: Major
          Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 2 hrs to fix

            Method _buildFilesystems has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function _buildFilesystems()
                {
                    $hideMounts = $hideFstypes = $hideDisks = $ignoreFree = $ignoreUsage = $ignoreThreshold = array();
                    $i = 1;
                    if (defined('PSI_HIDE_MOUNTS') && is_string(PSI_HIDE_MOUNTS)) {
            Severity: Major
            Found in phpsysinfo/includes/xml/class.XML.inc.php - About 2 hrs to fix

              Function reload has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function reload(initiate) {
                  $("#errorbutton").css("visibility", "hidden");
                  $("#errorbutton").css('cursor', 'default');
                  $("#errorbutton").attr('data-toggle', '');
                  $("#errors").empty();
              Severity: Major
              Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 2 hrs to fix

                Function getCpuCore has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
                        var model = "", speed = 0, bus = 0, cache = 0, bogo = 0, temp = 0, load = 0, speedmax = 0, speedmin = 0, cpucoreposition = 0, virt = "", manufacturer = "";
                        cpucount++;
                        model = $(this).attr("Model");
                        speed = parseInt($(this).attr("CpuSpeed"), 10);
                Severity: Major
                Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 2 hrs to fix

                  Function _processes has a Cognitive Complexity of 18 (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.NetBSD.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 18 (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.FreeBSD.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 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function _processes()
                      {
                          if (CommonFunctions::executeProgram('ps', 'alx', $bufr, PSI_DEBUG)) {
                              $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                              $processes['*'] = 0;
                  Severity: Minor
                  Found in phpsysinfo/includes/os/class.Minix.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 _addchild has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function _addchild($child, SimpleXMLExtended $xml, &$positions)
                      {
                          foreach ($child as $key=>$value) {
                              $xmlnode = $xml->addChild("Process");
                              if (isset($value[0])) {
                  Severity: Minor
                  Found in phpsysinfo/plugins/ps/class.ps.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 gdc has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function gdc($strPath, $booErrorRep = true)
                      {
                          $arrDirectoryContent = array();
                          $error = PSI_Error::singleton();
                          if (is_dir($strPath)) {
                  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

                  File class.HPUX.inc.php has 267 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

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

                    Function _fnFeatureHtmlLength has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function _fnFeatureHtmlLength ( oSettings )
                            {
                                if ( oSettings.oScroll.bInfinite )
                                {
                                    return null;
                    Severity: Major
                    Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 2 hrs to fix

                      Function wrapContent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function wrapContent() {
                              debug('wrapContent');
                      
                              var wrap = $(currentSettings.wrap[currentSettings.type]);
                              modal.content.append(wrap.children().remove());
                      Severity: Major
                      Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 2 hrs to fix

                        Function 1 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                        var $, Context, Transparency, helpers, _,
                          __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
                        
                        _ = require('../lib/lodash.js');
                        Severity: Major
                        Found in phpsysinfo/js/vendor/transparency.js - About 2 hrs to fix

                          Method _cpuinfo has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function _cpuinfo()
                              {
                                  $allCpus = $this->_get_Win32_Processor();
                                  if (!$allCpus) {
                                      $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";
                          Severity: Major
                          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

                            Method _network has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function _network()
                                {
                                    $dev = null;
                                    if (CommonFunctions::executeProgram('netstat', '-nibd', $netstat, PSI_DEBUG)) {
                                        $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                            Severity: Major
                            Found in phpsysinfo/includes/os/class.FreeBSD.inc.php - About 2 hrs to fix

                              Method _info has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function _info()
                                  {
                                      foreach ($this->_output as $ups) {
                              
                                          $dev = new UPSDevice();
                              Severity: Major
                              Found in phpsysinfo/includes/ups/class.apcupsd.inc.php - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language