XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js

Summary

Maintainability
F
1 mo
Test Coverage

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

    Function renderHardware has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

    function renderHardware(data) {
        var hw_type, datas, proc_param, i;
    
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
            $("#block_hardware").remove();
    Severity: Minor
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - 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

    Function renderHardware has 220 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function renderHardware(data) {
        var hw_type, datas, proc_param, i;
    
        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
            $("#block_hardware").remove();
    Severity: Major
    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 day to fix

      Function formatBytes has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      function formatBytes(bytes, byteFormat, parenths) {
          var show = "";
      
          if (byteFormat === undefined) {
              byteFormat = "auto_binary";
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - 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

      Function renderVitals has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      function renderVitals(data) {
          var hostname = "", ip = "";
      
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
              $("#block_vitals").remove();
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - 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

      Function renderNetwork has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
      Open

      function renderNetwork(data) {
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
              $("#block_network").remove();
              return;
          }
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 6 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 renderMemory has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

      function renderMemory(data) {
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
              $("#block_memory").remove();
              return;
          }
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 6 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 renderFilesystem has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

      function renderFilesystem(data) {
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
              $("#block_filesystem").remove();
              return;
          }
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 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 renderUPS has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

      function renderUPS(data) {
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
              $("#block_ups").remove();
              return;
          }
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 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 renderVitals has 112 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function renderVitals(data) {
          var hostname = "", ip = "";
      
          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
              $("#block_vitals").remove();
      Severity: Major
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 hrs to fix

        Function formatBytes has 111 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function formatBytes(bytes, byteFormat, parenths) {
            var show = "";
        
            if (byteFormat === undefined) {
                byteFormat = "auto_binary";
        Severity: Major
        Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 hrs to fix

          Function renderMemory has 111 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function renderMemory(data) {
              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
                  $("#block_memory").remove();
                  return;
              }
          Severity: Major
          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 4 hrs to fix

            Function full_addr has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function full_addr(ip_string) {
                var wrongvalue = false;
                ip_string = $.trim(ip_string).toLowerCase();
                // ipv4 notation
                if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
            Severity: Minor
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 3 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 renderUPS has 95 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function renderUPS(data) {
                if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
                    $("#block_ups").remove();
                    return;
                }
            Severity: Major
            Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 3 hrs to fix

              Function renderNetwork has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function renderNetwork(data) {
                  if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
                      $("#block_network").remove();
                      return;
                  }
              Severity: Major
              Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 3 hrs to fix

                Function renderFilesystem has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function renderFilesystem(data) {
                    if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
                        $("#block_filesystem").remove();
                        return;
                    }
                Severity: Major
                Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 3 hrs to fix

                  Function reload has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function reload(initiate) {
                      $("#errorbutton").css("visibility", "hidden");
                      $("#errorbutton").css('cursor', 'default');
                      $("#errorbutton").attr('data-toggle', '');
                      $("#errors").empty();
                  Severity: Minor
                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 3 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 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";
                  Severity: Minor
                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - 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 formatBPS has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function formatBPS(bps) {
                      var show = "";
                  
                      if (bps > Math.pow(1000, 5)) {
                          show += round(bps / Math.pow(1000, 5), 2);
                  Severity: Minor
                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - 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 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 full_addr has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function full_addr(ip_string) {
                        var wrongvalue = false;
                        ip_string = $.trim(ip_string).toLowerCase();
                        // ipv4 notation
                        if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
                    Severity: Major
                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 2 hrs to fix

                      Function renderCurrent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function renderCurrent(data) {
                          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                              $("#block_current").remove();
                              return;
                          }
                      Severity: Minor
                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                        Function renderVoltage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function renderVoltage(data) {
                            if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                $("#block_voltage").remove();
                                return;
                            }
                        Severity: Minor
                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                          Function html has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      html: function () {
                                          if ((this.Details === undefined) || (this.Details["@attributes"] === undefined)) {
                                              return '<div class="progress">' +
                                                  '<div class="progress-bar progress-bar-info" style="width:' + this["@attributes"].Percent + '%;"></div>' +
                                                  '</div><div class="percent">' + this["@attributes"].Percent + '%</div>';
                          Severity: Minor
                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                            Function renderPower has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function renderPower(data) {
                                if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {
                                    $("#block_power").remove();
                                    return;
                                }
                            Severity: Minor
                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                              Function renderTemperature has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function renderTemperature(data) {
                                  if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
                                      $("#block_temperature").remove();
                                      return;
                                  }
                              Severity: Minor
                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                Function renderFans has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function renderFans(data) {
                                    if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
                                        $("#block_fans").remove();
                                        return;
                                    }
                                Severity: Minor
                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                  Function getLanguage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function getLanguage(plugin, langarrId) {
                                      var getLangUrl = "";
                                      if (current_language) {
                                          getLangUrl = 'language/language.php?lang=' + current_language;
                                          if (plugin) {
                                  Severity: Minor
                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                    Function renderVoltage has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    function renderVoltage(data) {
                                        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                            $("#block_voltage").remove();
                                            return;
                                        }
                                    Severity: Minor
                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 renderCurrent has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    function renderCurrent(data) {
                                        if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                                            $("#block_current").remove();
                                            return;
                                        }
                                    Severity: Minor
                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 html has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                html: function () {
                                                    var processes = "", p111 = 0, p112 = 0, p113 = 0, p114 = 0, p115 = 0, p116 = 0;
                                                    var not_first = false;
                                                    processes = parseInt(this.Processes);
                                                    if (this.ProcessesRunning !== undefined) {
                                    Severity: Minor
                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                      Function formatBPS has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function formatBPS(bps) {
                                          var show = "";
                                      
                                          if (bps > Math.pow(1000, 5)) {
                                              show += round(bps / Math.pow(1000, 5), 2);
                                      Severity: Minor
                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                        Function changeSpanLanguage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function changeSpanLanguage(plugin) {
                                            var langId = "", langStr = "", langarrId = current_language + "_";
                                        
                                            if (plugin === undefined) {
                                                langarrId += "phpSysInfo";
                                        Severity: Minor
                                        Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                          Function renderTemperature has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          function renderTemperature(data) {
                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
                                                  $("#block_temperature").remove();
                                                  return;
                                              }
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 renderFans has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          function renderFans(data) {
                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
                                                  $("#block_fans").remove();
                                                  return;
                                              }
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 renderPower has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          function renderPower(data) {
                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {
                                                  $("#block_power").remove();
                                                  return;
                                              }
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 genlang has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          function genlang(id, plugin) {
                                              var html = "", idString = "", plugname = "",
                                                  langarrId = current_language + "_";
                                          
                                              if (plugin === undefined) {
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr 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 renderOther has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          function renderOther(data) {
                                              if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
                                                  $("#block_other").remove();
                                                  return;
                                              }
                                          Severity: Minor
                                          Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                            Function genlang has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            function genlang(id, plugin) {
                                                var html = "", idString = "", plugname = "",
                                                    langarrId = current_language + "_";
                                            
                                                if (plugin === undefined) {
                                            Severity: Minor
                                            Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 1 hr to fix

                                              Function renderOther has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              function renderOther(data) {
                                                  if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
                                                      $("#block_other").remove();
                                                      return;
                                                  }
                                              Severity: Minor
                                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins 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

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  if (bytes > Math.pow(1000, 2)) {
                                                                      show += round(bytes / Math.pow(1000, 2), 2);
                                                                      show += String.fromCharCode(160) + genlang(40);
                                                                  } else {
                                                                      if (bytes > Math.pow(1000, 1)) {
                                              Severity: Major
                                              Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                    if (bytes > Math.pow(1024, 2)) {
                                                                        show += round(bytes / Math.pow(1024, 2), 2);
                                                                        show += String.fromCharCode(160) + genlang(88);
                                                                    } else {
                                                                        if (bytes > Math.pow(1024, 1)) {
                                                Severity: Major
                                                Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if (bps > Math.pow(1000, 1)) {
                                                                          show += round(bps / Math.pow(1000, 1), 2);
                                                                          show += String.fromCharCode(160) + 'Kb/s';
                                                                      } else {
                                                                              show += bps;
                                                  Severity: Major
                                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins to fix

                                                    Function getLanguage has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                    function getLanguage(plugin, langarrId) {
                                                        var getLangUrl = "";
                                                        if (current_language) {
                                                            getLangUrl = 'language/language.php?lang=' + current_language;
                                                            if (plugin) {
                                                    Severity: Minor
                                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins 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

                                                    Consider simplifying this complex logical expression.
                                                    Open

                                                                    if (p111 || p112 || p113 || p114 || p115 || p116) {
                                                                        processes += " (";
                                                                        for (var proc_type in {111:0,112:1,113:2,114:3,115:4,116:5}) {
                                                                            if (eval("p" + proc_type)) {
                                                                                if (not_first) {
                                                    Severity: Major
                                                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 40 mins to fix

                                                      Function items has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function items(data) {
                                                          if (data !== undefined) {
                                                              if ((data.length > 0) &&  (data[0] !== undefined) && (data[0]["@attributes"] !== undefined)) {
                                                                  return data;
                                                              } else if (data["@attributes"] !== undefined ) {
                                                      Severity: Minor
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 35 mins 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

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function full_addr(ip_string) {
                                                          var wrongvalue = false;
                                                          ip_string = $.trim(ip_string).toLowerCase();
                                                          // ipv4 notation
                                                          if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 3 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1836..1901

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 550.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function renderCurrent(data) {
                                                          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                                                              $("#block_current").remove();
                                                              return;
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1195..1241

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 417.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function renderVoltage(data) {
                                                          if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                                              $("#block_voltage").remove();
                                                              return;
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1372..1419

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 417.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              if (bytes > Math.pow(1000, 5)) {
                                                                  show += round(bytes / Math.pow(1000, 5), 2);
                                                                  show += String.fromCharCode(160) + genlang(91);
                                                              } else {
                                                                  if (bytes > Math.pow(1000, 4)) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1736..1762

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 390.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              if (bytes > Math.pow(1024, 5)) {
                                                                  show += round(bytes / Math.pow(1024, 5), 2);
                                                                  show += String.fromCharCode(160) + genlang(90);
                                                              } else {
                                                                  if (bytes > Math.pow(1024, 4)) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1707..1733

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 390.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function formatBPS(bps) {
                                                          var show = "";
                                                      
                                                          if (bps > Math.pow(1000, 5)) {
                                                              show += round(bps / Math.pow(1000, 5), 2);
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 days to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 526..557

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 380.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function datetime() {
                                                          var date, day = 0, month = 0, year = 0, hour = 0, minute = 0, days = "", months = "", years = "", hours = "", minutes = "";
                                                          date = new Date();
                                                          day = date.getDate();
                                                          month = date.getMonth() + 1;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 day to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1936..1953

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 353.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function genlang(id, plugin) {
                                                          var html = "", idString = "", plugname = "",
                                                              langarrId = current_language + "_";
                                                      
                                                          if (plugin === undefined) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 day to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 173..206

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 263.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              RxBytes: {
                                                                  html: function () {
                                                                      var htmladd = '';
                                                                      if (showNetworkActiveSpeed && ($.inArray(this.Name, oldnetwork) >= 0)) {
                                                                          var diff, difftime;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 day to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1119..1134

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 250.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              TxBytes: {
                                                                  html: function () {
                                                                      var htmladd = '';
                                                                      if (showNetworkActiveSpeed && ($.inArray(this.Name, oldnetwork) >= 0)) {
                                                                          var diff, difftime;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 day to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1103..1118

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 250.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function round(x, n) {
                                                          var e = 0, k = "";
                                                          if (n < 0 || n > 14) {
                                                              return 0;
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 7 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 92..108

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 188.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              success: function buildblocks(xml) {
                                                                  var idexp;
                                                                  langxml[langarrId] = xml;
                                                                  if (langarr[langarrId] === undefined) {
                                                                      langarr.push(langarrId);
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 6 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 151..163

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 173.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function createCookie(name, value, days) {
                                                          var date = new Date(), expires = "";
                                                          if (days) {
                                                              date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                                                              if (typeof(date.toUTCString)==="function") {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 6 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 47..61

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 172.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              $('span[class*=lang_]').each(function translate(i) {
                                                                  langId = this.className.substring(5);
                                                                  if (langId.indexOf('plugin_') !== 0) { //does not begin with plugin_
                                                                      langStr = langarr[langarrId][langId];
                                                                      if (langStr !== undefined) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 4 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 237..247

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 115.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              $('span[class*=lang_plugin_'+plugin.toLowerCase()+'_]').each(function translate(i) {
                                                                  langId = this.className.substring(5);
                                                                  langStr = langarr[langarrId][langId];
                                                                  if (langStr !== undefined) {
                                                                      if (langStr.length > 0) {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 252..260

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 109.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              if ((data.Vitals !== undefined) && (data.Vitals["@attributes"] !== undefined) && ((hostname = data.Vitals["@attributes"].Hostname) !== undefined) && ((ip = data.Vitals["@attributes"].IPAddr) !== undefined)) {
                                                                  document.title = "System information: " + hostname + " (" + ip + ")";
                                                              }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 647..649

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 106.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          if ((data.Vitals !== undefined) && (data.Vitals["@attributes"] !== undefined) && ((hostname = data.Vitals["@attributes"].Hostname) !== undefined) && ((ip = data.Vitals["@attributes"].IPAddr) !== undefined)) {
                                                              document.title = "System information: " + hostname + " (" + ip + ")";
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 538..540

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 106.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                              Used: {
                                                                  html: function () {
                                                                      if ((this.Ignore !== undefined) && (this.Ignore >= 2)) {
                                                                          return formatBytes(this.Used, data.Options["@attributes"].byteFormat, true);
                                                                      } else {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1014..1022
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1023..1031

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 96.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      function changeLanguage(plugin) {
                                                          var langarrId = current_language + "_";
                                                      
                                                          if (plugin === undefined) {
                                                              langarrId += "phpSysInfo";
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 215..230

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 96.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                              Free: {
                                                                  html: function () {
                                                                      if ((this.Ignore !== undefined) && (this.Ignore > 0)) {
                                                                          return formatBytes(this.Free, data.Options["@attributes"].byteFormat, true);
                                                                      } else {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1014..1022
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1032..1040

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 96.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                              Total: {
                                                                  html: function () {
                                                                      if ((this.Ignore !== undefined) && (this.Ignore > 0)) {
                                                                          return formatBytes(this.Total, data.Options["@attributes"].byteFormat, true);
                                                                      } else {
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 3 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1023..1031
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1032..1040

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 96.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                                          if ((this.Details["@attributes"].AppPercent !== undefined) && (this.Details["@attributes"].AppPercent > 0)) {
                                                                              html += '<div class="progress-bar progress-bar-info" style="width:' + this.Details["@attributes"].AppPercent + '%;"></div>';
                                                                              rest -= parseInt(this.Details["@attributes"].AppPercent);
                                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 925..928
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 929..932

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 93.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                                          if ((this.Details["@attributes"].CachedPercent !== undefined) && (this.Details["@attributes"].CachedPercent > 0)) {
                                                                              html += '<div class="progress-bar progress-bar-warning" style="width:' + this.Details["@attributes"].CachedPercent + '%;"></div>';
                                                                              rest -= parseInt(this.Details["@attributes"].CachedPercent);
                                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 921..924
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 929..932

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 93.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                                          if ((this.Details["@attributes"].BuffersPercent !== undefined) && (this.Details["@attributes"].BuffersPercent > 0)) {
                                                                              html += '<div class="progress-bar progress-bar-danger" style="width:' + this.Details["@attributes"].BuffersPercent + '%;"></div>';
                                                                              rest -= parseInt(this.Details["@attributes"].BuffersPercent);
                                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 921..924
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 925..928

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 93.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          for (var i = 0; i < ca.length; i++) {
                                                              c = ca[i];
                                                              while (c.charAt(0) === ' ') {
                                                                  c = c.substring(1, c.length);
                                                              }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 73..81

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 91.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                      Array.prototype.pushIfNotExist = function(val) {
                                                          if (typeof(val) == 'undefined' || val === '') {
                                                              return;
                                                          }
                                                          val = $.trim(val);
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1955..1963

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 90.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              if (cookie_template !== null) {
                                                                  old_template = $("#template").val();
                                                                  $("#template").val(cookie_template);
                                                                  if ($("#template").val() === null) {
                                                                      $("#template").val(old_template);
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1758..1764

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 81.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                                  for (var i = 0; i < blocks.length; i++) {
                                                                      if ($("#block_"+blocks[i]).length > 0) {
                                                                          $("#output").children().eq(j).before($("#block_"+blocks[i]));
                                                                          j++;
                                                                      }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1709..1714

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 78.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              $("#template").change(function changeTemplate() {
                                                                  switchStyle($("#template").val().toString());
                                                                  createCookie('psi_bootstrap_template', $("#template").val().toString(), 365);
                                                                  return false;
                                                              });
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 2 hrs to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1768..1772

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 77.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                      Open

                                                                      for (proc_param in paramlist) {
                                                                          if (datas[i]["@attributes"][proc_param] !== undefined) {
                                                                              $('#ups-'+ i +'-'+proc_param).render(datas[i]["@attributes"], directives);
                                                                          }
                                                                      }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 2 other locations - About 1 hr to fix
                                                      phpsysinfo/plugins/bat/js/bat_bootstrap.js on lines 122..126
                                                      phpsysinfo/plugins/stablebit/js/stablebit_bootstrap.js on lines 78..82

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 68.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          if (current_language) {
                                                              getLangUrl = 'language/language.php?lang=' + current_language;
                                                              if (plugin) {
                                                                  getLangUrl += "&plugin=" + plugin;
                                                              }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 132..142

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 65.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          if (showNetworkActiveSpeed) {
                                                              while (oldnetwork.length > 0) {
                                                                  delete oldnetwork[oldnetwork.length-1]; //remove last object
                                                                  oldnetwork.pop(); //remove last object reference from array
                                                              }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1058..1064

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 62.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                      Open

                                                              Load: {
                                                                  html: function () {
                                                                      return '<div class="progress">' +
                                                                              '<div class="progress-bar progress-bar-info" style="width:' + round(this.Load,0) + '%;"></div>' +
                                                                              '</div><div class="percent">' + round(this.Load,0) + '%</div>';
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 4 other locations - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1486..1492
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1493..1499
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 4..10
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 11..17

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 61.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                      Open

                                                              LoadPercent: {
                                                                  html: function () {
                                                                      return '<div class="progress">' +
                                                                              '<div class="progress-bar progress-bar-info" style="width:' + round(this.LoadPercent,0) + '%;"></div>' +
                                                                              '</div><div class="percent">' + round(this.LoadPercent,0) + '%</div>';
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 4 other locations - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 703..709
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1493..1499
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 4..10
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 11..17

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 61.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                      Open

                                                              BatteryChargePercent: {
                                                                  html: function () {
                                                                      return '<div class="progress">' +
                                                                              '<div class="progress-bar progress-bar-info" style="width:' + round(this.BatteryChargePercent,0) + '%;"></div>' +
                                                                              '</div><div class="percent">' + round(this.BatteryChargePercent,0) + '%</div>';
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 4 other locations - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 703..709
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1486..1492
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 4..10
                                                      phpsysinfo/plugins/docker/js/docker_bootstrap.js on lines 11..17

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 61.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                              if (i > 0) {
                                                                  $("#errorbutton").attr('data-toggle', 'modal');
                                                                  $("#errorbutton").css('cursor', 'pointer');
                                                                  $("#errorbutton").css("visibility", "visible");
                                                              }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 223..227

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 59.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                                      if (errs > 0) {
                                                                          $("#errorbutton").attr('data-toggle', 'modal');
                                                                          $("#errorbutton").css('cursor', 'pointer');
                                                                          $("#errorbutton").css("visibility", "visible");
                                                                      }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1566..1570

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 59.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          switch ($("#showNetworkActiveSpeed").val().toString()) {
                                                              case "bps":  showNetworkActiveSpeed = 2;
                                                                            break;
                                                              case "true": showNetworkActiveSpeed = 1;
                                                                            break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 1694..1700

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 55.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          if (intDays) {
                                                              txt += intDays.toString() + String.fromCharCode(160) + genlang(48) + String.fromCharCode(160); //days
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1594..1596

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 55.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                          if (intHours) {
                                                              txt += intHours.toString() + String.fromCharCode(160) + genlang(49) + String.fromCharCode(160); //hours
                                                          }
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 1 hr to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1591..1593

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 55.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "kib":
                                                              show += round(bytes / Math.pow(1024, 1), 2);
                                                              show += String.fromCharCode(160) + genlang(89);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "gib":
                                                              show += round(bytes / Math.pow(1024, 3), 2);
                                                              show += String.fromCharCode(160) + genlang(87);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "kb":
                                                              show += round(bytes / Math.pow(1000, 1), 2);
                                                              show += String.fromCharCode(160) + genlang(39);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "tib":
                                                              show += round(bytes / Math.pow(1024, 4), 2);
                                                              show += String.fromCharCode(160) + genlang(86);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "mib":
                                                              show += round(bytes / Math.pow(1024, 2), 2);
                                                              show += String.fromCharCode(160) + genlang(88);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "pb":
                                                              show += round(bytes / Math.pow(1000, 5), 2);
                                                              show += String.fromCharCode(160) + genlang(91);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "gb":
                                                              show += round(bytes / Math.pow(1000, 3), 2);
                                                              show += String.fromCharCode(160) + genlang(41);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "mb":
                                                              show += round(bytes / Math.pow(1000, 2), 2);
                                                              show += String.fromCharCode(160) + genlang(40);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "pib":
                                                              show += round(bytes / Math.pow(1024, 5), 2);
                                                              show += String.fromCharCode(160) + genlang(90);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1686..1689
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 10 locations. Consider refactoring.
                                                      Open

                                                          case "tb":
                                                              show += round(bytes / Math.pow(1000, 4), 2);
                                                              show += String.fromCharCode(160) + genlang(85);
                                                              break;
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 9 other locations - About 55 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1662..1665
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1666..1669
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1670..1673
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1674..1677
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1678..1681
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1682..1685
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1690..1693
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1694..1697
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1698..1701

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 53.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                                      html+="<tr id=\"hardware-" + hw_type + "-" + i +"\" class=\"treegrid-" + hw_type + "-" + i +" treegrid-parent-" + hw_type + "\">";
                                                      Severity: Minor
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 35 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 801..801

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 47.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                      Open

                                                                              html+="<tr id=\"hardware-" + hw_type +"-" + i + "-" + proc_param + "\" class=\"treegrid-parent-" + hw_type +"-" + i +"\">";
                                                      Severity: Minor
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 1 other location - About 35 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 794..794

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 47.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                      Open

                                                              BatteryVoltage: {
                                                                  html: function () {
                                                                      return this.BatteryVoltage + String.fromCharCode(160) + genlang(82); //V
                                                                  }
                                                              },
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1466..1470
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1471..1475
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1481..1485

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 45.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                      Open

                                                              TimeLeftMinutes: {
                                                                  html: function () {
                                                                      return this.TimeLeftMinutes + String.fromCharCode(160) + genlang(83); //minutes
                                                                  }
                                                              },
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1466..1470
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1471..1475
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1476..1480

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 45.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                      Open

                                                              LineFrequency: {
                                                                  html: function () {
                                                                      return this.LineFrequency + String.fromCharCode(160)  + genlang(109); //Hz
                                                                  }
                                                              },
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1466..1470
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1476..1480
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1481..1485

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 45.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                      Open

                                                              LineVoltage: {
                                                                  html: function () {
                                                                      return this.LineVoltage + String.fromCharCode(160) + genlang(82); //V
                                                                  }
                                                              },
                                                      Severity: Major
                                                      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1471..1475
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1476..1480
                                                      phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1481..1485

                                                      Duplicated Code

                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                      Tuning

                                                      This issue has a mass of 45.

                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                      Refactorings

                                                      Further Reading

                                                      There are no issues that match your filters.

                                                      Category
                                                      Status