Showing 1,065 of 16,781 total issues
Function renderPlugin_smart
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_smart(data) {
if ((data.Plugins.Plugin_SMART !== undefined) && (data.Plugins.Plugin_SMART.columns !== undefined) && (items(data.Plugins.Plugin_SMART.columns.column).length > 0) && (data.Plugins.Plugin_SMART.disks !== undefined) && (items(data.Plugins.Plugin_SMART.disks.disk).length > 0)) {
var smartitems = items(data.Plugins.Plugin_SMART.columns.column);
var smartnames = {
Function snmppinfo_buildTable
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function snmppinfo_buildTable(xml) {
var html = "", tree = [], closed = [];
$("#Plugin_SNMPPInfo #Plugin_SNMPPInfoTable").remove();
File class.smart.inc.php
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* SMART plugin, which displays all SMART informations available
*
* @category PHP
Function buildFragment
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildFragment( elems, context, scripts, selection, ignored ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
Function raid_buildinfos
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function raid_buildinfos(xml, id) {
var html = "", prog = "", devname = "", devstatus = "", devlevel = "", devcontroller = "", devbattery = "", devsupported = "", devsize = 0, devstride = 0, devsubsets = 0, devdevs = 0, devspares = 0, devchunk = 0, devalgor = "", devpersist = 0, devreg = 0, devact = 0, devcache = 0, devbad = 0, devread = "", devwrite = "", button = "";
prog = $(xml).attr("Program");
devname = $(xml).attr("Name");
- Read upRead up
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 _hardware
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function _hardware()
{
foreach ($this->_devicelist('PCI') as $pciDev) {
$dev = new HWDevice();
$dev->setName($pciDev['Name']);
- Read upRead up
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 22 (exceeds 5 allowed). Consider refactoring. Open
private function _cpuinfo()
{
$ncpu = 0;
$tcpu = "";
$vcpu = "";
- Read upRead up
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
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
if (empty($this->_filecontent)) {
return;
}
- Read upRead up
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 fnSetColumnVis
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
{
var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
var i, iLen;
var iColumns = oSettings.aoColumns.length;
Method _findProgram
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function _findProgram($strProgram)
{
$path_parts = pathinfo($strProgram);
if (empty($path_parts['basename'])) {
return null;
File main.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
/**
Function _fnSortAttachListener
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
{
$(nNode).on( 'click.DT', function (e) {
/* If the column is not sortable - don't to anything */
if ( oSettings.aoColumns[iDataIndex].bSortable === false )
Function 5
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"../lib/lodash.js":7,"./attributeFactory":2,"./helpers":5}],5:[function(require,module,exports){
var ElementFactory, expando, html5Clone, _getElements;
ElementFactory = require('./elementFactory');
Function add
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
var tmp, events, t, handleObjIn,
special, eventHandle, handleObj,
handlers, type, namespaces, origType,
elemData = jQuery._data( elem );
Function _fnInitialise
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnInitialise ( oSettings )
{
var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
/* Ensure that the table data is fully initialised */
Consider simplifying this complex logical expression. Open
if (preg_match('/^I:\s+(.+)/', $buf, $bufr)
&& isset($bufr[1]) && (trim($bufr[1])!=="")) {
$devnam = trim($bufr[1]);
$usbarray[$devnam]['phys'] = 'unknown';
} elseif (preg_match('/^N:\s+Name="([^"]+)"/', $buf, $bufr2)
Function buildpage
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
$(document).ready(function buildpage() {
var i = 0, old_template = null, cookie_template = null, cookie_language = null, blocktmp = "";
showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
Function renderPlugin_ps
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_ps(data) {
var directives = {
MemoryUsage: {
html: function () {
Function changeSpanLanguage
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function changeSpanLanguage(plugin) {
var langId = "", langStr = "", langarrId = current_language + "_";
if (plugin === undefined) {
langarrId += "phpSysInfo";
- Read upRead up
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 changeSpanLanguage
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function changeSpanLanguage(plugin) {
var langId = "", langStr = "", langarrId = current_language + "_";
if (plugin === undefined) {
langarrId += "phpSysInfo";
- Read upRead up
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"