XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Function dataTable has 4156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.dataTable = function( oInit )
    {
        /*
         * Function: classSettings
         * Purpose:  Settings container function for all 'class' properties which are required
Severity: Major
Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 2 wks to fix

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

    /*!
     * jQuery JavaScript Library v1.12.4-ff3fix-ff2fix
     * http://jquery.com/
     *
     * Includes Sizzle.js
    Severity: Major
    Found in phpsysinfo/js/jQuery/jquery.js - About 2 wks to fix

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

      /*
       * File:        jquery.dataTables.js
       * Version:     1.8.2+jquery1.9fix+parseJSONfix2+bindfix
       * Description: Paginate, search and sort HTML tables
       * Author:      Allan Jardine (www.sprymedia.co.uk)
      Severity: Major
      Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 1 wk to fix

        Function _distro has a Cognitive Complexity of 415 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function _distro()
            {
                $this->sys->setDistribution("Linux");
                $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);
                if (!$list) {
        Severity: Minor
        Found in phpsysinfo/includes/os/class.Linux.inc.php - About 1 wk 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 __construct has a Cognitive Complexity of 365 (exceeds 5 allowed). Consider refactoring.
        Open

            public function __construct($enc)
            {
                parent::__construct(__CLASS__, $enc);
                $buffer = array();
                switch (strtolower(PSI_PLUGIN_BAT_ACCESS)) {
        Severity: Minor
        Found in phpsysinfo/plugins/bat/class.bat.inc.php - About 1 wk 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 Sizzle has 1387 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        (function( window ) {
        
        var i,
            support,
            Expr,
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.js - About 6 days to fix

          Function execute has a Cognitive Complexity of 311 (exceeds 5 allowed). Consider refactoring.
          Open

              public function execute()
              {
                  if (empty($this->_filecontent)) {
                      return;
                  }
          Severity: Minor
          Found in phpsysinfo/plugins/bat/class.bat.inc.php - About 6 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 _cpuinfo has a Cognitive Complexity of 307 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function _cpuinfo()
              {
                  if (CommonFunctions::rfts('/proc/cpuinfo', $bufr)) {
                      $cpulist = null;
                      $raslist = null;
          Severity: Minor
          Found in phpsysinfo/includes/os/class.Linux.inc.php - About 6 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 _network has a Cognitive Complexity of 289 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function _network()
              {
                  if (CommonFunctions::rfts('/proc/net/dev', $bufr, 0, 4096, PSI_DEBUG)) {
                      $bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                      foreach ($bufe as $buf) {
          Severity: Minor
          Found in phpsysinfo/includes/os/class.Linux.inc.php - About 5 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 execute_idrac has a Cognitive Complexity of 262 (exceeds 5 allowed). Consider refactoring.
          Open

              private function execute_idrac($buffer, $device)
              {
                  $snmptablec = array(); //controller table
                  $snmptableb = array(); //battery table
                  $snmptablev = array(); //virtual disks table
          Severity: Minor
          Found in phpsysinfo/plugins/raid/class.raid.inc.php - About 5 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 _network has a Cognitive Complexity of 259 (exceeds 5 allowed). Consider refactoring.
          Open

              private function _network()
              {
                  if ($this->_wmi) {
                      $buffer = $this->_get_Win32_OperatingSystem();
                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8
          Severity: Minor
          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 5 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 execute_zpool has a Cognitive Complexity of 228 (exceeds 5 allowed). Consider refactoring.
          Open

              private function execute_zpool($buffer)
              {
                  $raiddata = preg_split("/(\r?\n)+ +(?=pool: )/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
                  if (!empty($raiddata)) foreach ($raiddata as $raid) {
                      if (preg_match("/^pool: (\S+)/", $raid, $buff)) {
          Severity: Minor
          Found in phpsysinfo/plugins/raid/class.raid.inc.php - About 4 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 df has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function df($df_param = "", $get_inodes = true)
              {
                  $arrResult = array();
                  if (CommonFunctions::executeProgram('mount', '', $mount, PSI_DEBUG)) {
                      $mount = preg_split("/\n/", $mount, -1, PREG_SPLIT_NO_EMPTY);
          Severity: Minor
          Found in phpsysinfo/includes/class.Parser.inc.php - About 4 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

          File phpsysinfo_bootstrap.js has 1633 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var langxml = [], langarr = [], current_language = "", plugins = [], blocks = [], plugin_liste = [],
               showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, oldnetwork = [], refrTimer;
          
          /**
           * generate a cookie, if not exist, and add an entry to it<br><br>
          Severity: Major
          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 days to fix

            File phpsysinfo.js has 1577 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /***************************************************************************
             *   Copyright (C) 2008 by phpSysInfo - A PHP System Information Script    *
             *   http://phpsysinfo.sourceforge.net/                                    *
             *                                                                         *
             *   This program is free software; you can redistribute it and/or modify  *
            Severity: Major
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 4 days to fix

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

              <?php
              /**
               * Linux System Class
               *
               * PHP version 5
              Severity: Major
              Found in phpsysinfo/includes/os/class.Linux.inc.php - About 3 days to fix

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

                /*
                 * nyroModal - jQuery Plugin
                 * http://nyromodal.nyrodev.com
                 *
                 * Copyright (c) 2010 Cedric Nirousset (nyrodev.com)
                Severity: Major
                Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 3 days to fix

                  Function execute has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function execute()
                      {
                          if (empty($this->_filecontent) || empty($this->_ids)) {
                              return;
                          }
                  Severity: Minor
                  Found in phpsysinfo/plugins/smart/class.smart.inc.php - About 3 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 execute_dmraid has a Cognitive Complexity of 173 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function execute_dmraid($buffer)
                      {
                          $raiddata = preg_split("/(\r?\n\*\*\* )|(\r?\n--> )/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
                          if (!empty($raiddata)) {
                              $group = "";
                  Severity: Minor
                  Found in phpsysinfo/plugins/raid/class.raid.inc.php - About 3 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

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

                  <?php
                  /**
                   * Raid Plugin, which displays RAID status
                   *
                   * @category  PHP
                  Severity: Major
                  Found in phpsysinfo/plugins/raid/class.raid.inc.php - About 3 days to fix
                    Severity
                    Category
                    Status
                    Source
                    Language