APO-Epsilon/apo-website

View on GitHub

Showing 11,898 of 11,898 total issues

Method email_new_pw has 84 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function email_new_pw($to) {
    
    include ('mysql_access.php');
    
    $aresponse=$db->query("SELECT username FROM contact_information WHERE email='$to'");
Severity: Major
Found in login_forgotpw.php - About 3 hrs to fix

    Function show_active has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    function show_active() {
        //Code based on example at https://vikasmahajan.wordpress.com/2010/07/07/inserting-and-displaying-images-in-mysql-using-php/
        include('../mysql_access.php');
        $user_id = $_SESSION['sessionID'];
        $maxsize = 3000000;
    Severity: Minor
    Found in includes/upload_photo_process.php - 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 email_new_pw has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    function email_new_pw($to) {
        
        include ('mysql_access.php');
        
        $aresponse=$db->query("SELECT username FROM contact_information WHERE email='$to'");
    Severity: Minor
    Found in login_forgotpw.php - 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

    File service_signup.php has 294 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    require_once ('session.php');
    require_once ('mysql_access.php');
    ?>
    <!doctype html>
    Severity: Minor
    Found in service_signup.php - About 3 hrs to fix

      Method initializeNewWeekForm has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Major
      Found in service_admin_week_setup.php - About 3 hrs to fix

        File check_requirements.php has 292 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        require_once ('session.php');
        require_once ('mysql_access.php');
        ?>
        <!doctype html>
        Severity: Minor
        Found in check_requirements.php - About 3 hrs to fix

          Function process_login has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

          function process_login(){
            require_once ('mysql_access.php');
            $username = addslashes($_POST["username"]);
            $password = addslashes($_POST["password"]);
            $hasher = new PasswordHash(8, true);
          Severity: Minor
          Found in login_process.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 show_active has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

          function show_active() {
              include('mysql_access.php');
              $user_id = $_SESSION['sessionID'];    
              $aresponse=$db->query("SELECT status FROM contact_information WHERE id=$user_id");
              $aresult=mysqli_fetch_array($aresponse);
          Severity: Minor
          Found in create_event_done.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

          File upload_photo.php has 287 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          require_once ('session.php');
          require_once ('mysql_access.php');
          require_once ('get_photo.php');
          //Code based on example at https://vikasmahajan.wordpress.com/2010/07/07/inserting-and-displaying-images-in-mysql-using-php/
          Severity: Minor
          Found in upload_photo.php - About 2 hrs to fix

            File create_event.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            require_once ('session.php');
            require_once ('mysql_access.php');
            ?>
            <!doctype html>
            Severity: Minor
            Found in create_event.php - About 2 hrs to fix

              Function initializeNewWeekForm has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              function initializeNewWeekForm(){
                include('mysql_access.php');
                $dateMap1 = array(0,6,5,4,3,2,1);
                $currentDOW1 = date('w');//returns integer of DOW
                $z1 = $dateMap1[$currentDOW1];//go through map
              Severity: Minor
              Found in service_admin_week_setup.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

              Method check_hours has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function check_hours() {
                include ('mysql_access.php');
                //$sql = "SELECT id FROM contact_information WHERE status = 'Active' OR status = 'Pledge' OR status = 'Elected' OR status = 'Appointed'";
                //$users = $db->query($sql);
              
              Severity: Major
              Found in check_all_hours.php - About 2 hrs to fix

                Method show_active has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function show_active() {
                    //dropdown list of events
                    ?>
                    <h1> Attendance Check-In </h1>
                        <?php
                Severity: Major
                Found in rec_sec_attendance_tool.php - About 2 hrs to fix

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

                  function show_page() {
                    include('mysql_access.php');
                    global $current_semester;
                  
                    if (isset($_POST['update'])) {
                  Severity: Minor
                  Found in updateinfo.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

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

                      switch ($num) {
                      case 1:
                          $word1 = 'Dog';
                          break;
                      case 2:
                  Severity: Major
                  Found in login_forgotpw.php and 1 other location - About 2 hrs to fix
                  login_forgotpw.php on lines 59..92

                  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 133.

                  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

                      switch ($num) {
                      case 1:
                          $word2 = 'Dog';
                          break;
                      case 2:
                  Severity: Major
                  Found in login_forgotpw.php and 1 other location - About 2 hrs to fix
                  login_forgotpw.php on lines 23..56

                  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 133.

                  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 7 locations. Consider refactoring.
                  Open

                  function display_pledge_members() {
                      $count = 0;
                      include('mysql_access.php');
                      $response=$db->query("SELECT * FROM contact_information WHERE status = 'Pledge' ORDER BY lastname");
                      echo '<table>';
                  Severity: Major
                  Found in membership.php and 6 other locations - About 2 hrs to fix
                  membership.php on lines 137..148
                  membership.php on lines 149..160
                  membership.php on lines 161..172
                  membership.php on lines 173..184
                  membership.php on lines 185..196
                  membership.php on lines 209..220

                  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 129.

                  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 7 locations. Consider refactoring.
                  Open

                  function display_all_members() {
                      $count = 0;
                      include('mysql_access.php');
                      $response=$db->query("SELECT * FROM contact_information ORDER BY lastname");
                      echo '<table>';
                  Severity: Major
                  Found in membership.php and 6 other locations - About 2 hrs to fix
                  membership.php on lines 149..160
                  membership.php on lines 161..172
                  membership.php on lines 173..184
                  membership.php on lines 185..196
                  membership.php on lines 197..208
                  membership.php on lines 209..220

                  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 129.

                  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 7 locations. Consider refactoring.
                  Open

                  function display_senior_members() {
                      $count = 0;
                      include('mysql_access.php');
                      $response=$db->query("SELECT * FROM contact_information WHERE status = 'Senior' ORDER BY lastname");
                      echo '<table>';
                  Severity: Major
                  Found in membership.php and 6 other locations - About 2 hrs to fix
                  membership.php on lines 137..148
                  membership.php on lines 149..160
                  membership.php on lines 161..172
                  membership.php on lines 173..184
                  membership.php on lines 185..196
                  membership.php on lines 197..208

                  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 129.

                  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 7 locations. Consider refactoring.
                  Open

                  function display_associate_members() {
                      $count = 0;
                      include('mysql_access.php');
                      $response=$db->query("SELECT * FROM contact_information WHERE status = 'Associate' ORDER BY lastname");
                      echo '<table>';
                  Severity: Major
                  Found in membership.php and 6 other locations - About 2 hrs to fix
                  membership.php on lines 137..148
                  membership.php on lines 149..160
                  membership.php on lines 173..184
                  membership.php on lines 185..196
                  membership.php on lines 197..208
                  membership.php on lines 209..220

                  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 129.

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language