XoopsModules25x/adminer

View on GitHub
include/bigdump.php

Summary

Maintainability
D
2 days
Test Coverage

File bigdump.php has 759 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

error_reporting(E_ALL);

// BigDump ver. 0.36b from 2015-04-30
Severity: Major
Found in include/bigdump.php - About 1 day to fix

    Method create_ajax_script has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function create_ajax_script() 
    {
      global $linenumber, $foffset, $totalqueries, $delaypersession, $curfilename, $delimiter;
    ?>
    
    Severity: Major
    Found in include/bigdump.php - About 2 hrs to fix

      Method create_xml_response has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function create_xml_response() 
      {
        global $linenumber, $foffset, $totalqueries, $curfilename, $delimiter,
                       $lines_this, $lines_done, $lines_togo, $lines_tota,
                       $queries_this, $queries_done, $queries_togo, $queries_tota,
      Severity: Minor
      Found in include/bigdump.php - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                  if (trim($dumpline)=="" || strpos (trim($dumpline), $comment_value) === 0)
                  { $skipline=true;
                    break;
                  }
        Severity: Major
        Found in include/bigdump.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                  if (!TESTMODE && !$mysqli->query($query))
                  { echo ("<p class=\"error\">Error at the line $linenumber: ". trim($dumpline)."</p>\n");
                    echo ("<p>Query: ".trim(nl2br(htmlentities($query)))."</p>\n");
                    echo ("<p>MySQL: ".$mysqli->error."</p>\n");
                    $error=true;
          Severity: Major
          Found in include/bigdump.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                    if ($skipline)
                    { $linenumber++;
            
            // DIAGNOSTIC
            // echo ("<p>Comment line skipped</p>\n");
            Severity: Major
            Found in include/bigdump.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                      if ($csv_add_slashes)
                        $dumpline = addslashes($dumpline);
              Severity: Major
              Found in include/bigdump.php - About 45 mins to fix

                There are no issues that match your filters.

                Category
                Status