tux-00/network_miner

View on GitHub

Showing 5 of 9 total issues

Function rendering has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function rendering() {
    // Layout scale
    var width = 1400,
        height = 1600;

Severity: Major
Found in functions.js - About 2 hrs to fix

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

    function get_oid() {
        global $OIDS;
    
        if ($_POST['community_input'] == '') {
            $COMMUNITY = 'public';
    Severity: Minor
    Found in data_mining.php - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    function get_device_links($base_device) {
        global $devices;
        global $nodes;
        global $group;
        global $links;
    Severity: Minor
    Found in data_mining.php - 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

    Method get_device_links has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function get_device_links($base_device) {
        global $devices;
        global $nodes;
        global $group;
        global $links;
    Severity: Minor
    Found in data_mining.php - About 1 hr to fix

      Method get_oid has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function get_oid() {
          global $OIDS;
      
          if ($_POST['community_input'] == '') {
              $COMMUNITY = 'public';
      Severity: Minor
      Found in data_mining.php - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language