WordPress/WordPress

View on GitHub
wp-admin/includes/class-pclzip.php

Summary

Maintainability
F
1 mo
Test Coverage

File class-pclzip.php has 2961 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// --------------------------------------------------------------------------------
// PhpConcept Library - Zip Module 2.8.2
// --------------------------------------------------------------------------------
// License GNU/LGPL - Vincent Blavet - August 2009
Severity: Major
Found in wp-admin/includes/class-pclzip.php - About 1 wk to fix

    Function privExtractFile has a Cognitive Complexity of 134 (exceeds 5 allowed). Consider refactoring.
    Open

      function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
      {
        $v_result=1;
    
        // ----- Read the file header
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - About 2 days 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 privExtractByRule has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
    Open

      function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
      {
        $v_result=1;
    
        // ----- Magic quotes trick
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - About 2 days 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 privDeleteByRule has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring.
    Open

      function privDeleteByRule(&$p_result_list, &$p_options)
      {
        $v_result=1;
        $v_list_detail = array();
    
    
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - About 2 days 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 privParseOptions has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
    Open

      function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
      {
        $v_result=1;
    
        // ----- Read the options
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - 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 privAddFile has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
    Open

      function privAddFile($p_filedescr, &$p_header, &$p_options)
      {
        $v_result=1;
    
        // ----- Working variable
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - 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 privFileDescrExpand has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
    Open

      function privFileDescrExpand(&$p_filedescr_list, &$p_options)
      {
        $v_result=1;
    
        // ----- Create a result list
    Severity: Minor
    Found in wp-admin/includes/class-pclzip.php - 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

    Method privParseOptions has 222 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
      {
        $v_result=1;
    
        // ----- Read the options
    Severity: Major
    Found in wp-admin/includes/class-pclzip.php - About 1 day to fix

      Function privCalculateStoredFilename has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
      Open

        function privCalculateStoredFilename(&$p_filedescr, &$p_options)
        {
          $v_result=1;
      
          // ----- Working variables
      Severity: Minor
      Found in wp-admin/includes/class-pclzip.php - 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 PclZipUtilPathReduction has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
      Open

        function PclZipUtilPathReduction($p_dir)
        {
          $v_result = "";
      
          // ----- Look for not empty path
      Severity: Minor
      Found in wp-admin/includes/class-pclzip.php - 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

      Method privExtractByRule has 198 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
        {
          $v_result=1;
      
          // ----- Magic quotes trick
      Severity: Major
      Found in wp-admin/includes/class-pclzip.php - About 7 hrs to fix

        Method privExtractFile has 186 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
          {
            $v_result=1;
        
            // ----- Read the file header
        Severity: Major
        Found in wp-admin/includes/class-pclzip.php - About 7 hrs to fix

          PclZip has 51 functions (exceeds 20 allowed). Consider refactoring.
          Open

            class PclZip
            {
              // ----- Filename of the zip file
              var $zipname = '';
          
          
          Severity: Major
          Found in wp-admin/includes/class-pclzip.php - About 7 hrs to fix

            Method privDeleteByRule has 161 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function privDeleteByRule(&$p_result_list, &$p_options)
              {
                $v_result=1;
                $v_list_detail = array();
            
            
            Severity: Major
            Found in wp-admin/includes/class-pclzip.php - About 6 hrs to fix

              Function privFileDescrParseAtt has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
              Open

                function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
                {
                  $v_result=1;
              
                  // ----- For each file in the list check the attributes
              Severity: Minor
              Found in wp-admin/includes/class-pclzip.php - 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

              Method privAddFile has 150 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function privAddFile($p_filedescr, &$p_header, &$p_options)
                {
                  $v_result=1;
              
                  // ----- Working variable
              Severity: Major
              Found in wp-admin/includes/class-pclzip.php - About 6 hrs to fix

                Function extractByIndex has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                Open

                  function extractByIndex($p_index)
                  {
                    $v_result=1;
                
                    // ----- Reset the error handler
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - About 5 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 create has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                  function create($p_filelist)
                  {
                    $v_result=1;
                
                    // ----- Reset the error handler
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - About 5 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 extract has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                  function extract()
                  {
                    $v_result=1;
                
                    // ----- Reset the error handler
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - About 5 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 privExtractFileAsString has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                Open

                  function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
                  {
                    $v_result=1;
                
                    // ----- Read the file header
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - 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 add has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                Open

                  function add($p_filelist)
                  {
                    $v_result=1;
                
                    // ----- Reset the error handler
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - 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 privExtractFileInOutput has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                Open

                  function privExtractFileInOutput(&$p_entry, &$p_options)
                  {
                    $v_result=1;
                
                    // ----- Read the file header
                Severity: Minor
                Found in wp-admin/includes/class-pclzip.php - 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

                Method privMerge has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function privMerge(&$p_archive_to_add)
                  {
                    $v_result=1;
                
                    // ----- Look if the archive_to_add exists
                Severity: Major
                Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                  Method privAdd has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
                    {
                      $v_result=1;
                      $v_list_detail = array();
                  
                  
                  Severity: Major
                  Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

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

                      function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
                      {
                        $v_result = 1;
                    
                        if ($p_mode==0)
                    Severity: Minor
                    Found in wp-admin/includes/class-pclzip.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 PclZipUtilPathInclusion has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                    Open

                      function PclZipUtilPathInclusion($p_dir, $p_path)
                      {
                        $v_result = 1;
                    
                        // ----- Look for path beginning by ./
                    Severity: Minor
                    Found in wp-admin/includes/class-pclzip.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

                    Method create has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function create($p_filelist)
                      {
                        $v_result=1;
                    
                        // ----- Reset the error handler
                    Severity: Major
                    Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                      Method add has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function add($p_filelist)
                        {
                          $v_result=1;
                      
                          // ----- Reset the error handler
                      Severity: Major
                      Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                        Function privReadEndCentralDir has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                        Open

                          function privReadEndCentralDir(&$p_central_dir)
                          {
                            $v_result=1;
                        
                            // ----- Go to the end of the zip file
                        Severity: Minor
                        Found in wp-admin/includes/class-pclzip.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

                        Method extractByIndex has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function extractByIndex($p_index)
                          {
                            $v_result=1;
                        
                            // ----- Reset the error handler
                        Severity: Major
                        Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                          Method privReadEndCentralDir has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function privReadEndCentralDir(&$p_central_dir)
                            {
                              $v_result=1;
                          
                              // ----- Go to the end of the zip file
                          Severity: Major
                          Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                            Method privCalculateStoredFilename has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function privCalculateStoredFilename(&$p_filedescr, &$p_options)
                              {
                                $v_result=1;
                            
                                // ----- Working variables
                            Severity: Major
                            Found in wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                              Method privFileDescrParseAtt has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
                                {
                                  $v_result=1;
                              
                                  // ----- For each file in the list check the attributes
                              Severity: Major
                              Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                Method extract has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function extract()
                                  {
                                    $v_result=1;
                                
                                    // ----- Reset the error handler
                                Severity: Major
                                Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

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

                                    function privFileDescrExpand(&$p_filedescr_list, &$p_options)
                                    {
                                      $v_result=1;
                                  
                                      // ----- Create a result list
                                  Severity: Major
                                  Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                    Method privExtractFileAsString has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
                                      {
                                        $v_result=1;
                                    
                                        // ----- Read the file header
                                    Severity: Major
                                    Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                      Function privAdd has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                        function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
                                        {
                                          $v_result=1;
                                          $v_list_detail = array();
                                      
                                      
                                      Severity: Minor
                                      Found in wp-admin/includes/class-pclzip.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 privAddFileUsingTempFile has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
                                        {
                                          $v_result=PCLZIP_ERR_NO_ERROR;
                                      
                                          // ----- Working variable
                                      Severity: Major
                                      Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                        Method privExtractFileInOutput has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function privExtractFileInOutput(&$p_entry, &$p_options)
                                          {
                                            $v_result=1;
                                        
                                            // ----- Read the file header
                                        Severity: Major
                                        Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                          Method privReadFileHeader has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            function privReadFileHeader(&$p_header)
                                            {
                                              $v_result=1;
                                          
                                              // ----- Read the 4 bytes signature
                                          Severity: Minor
                                          Found in wp-admin/includes/class-pclzip.php - About 2 hrs to fix

                                            Method privReadCentralFileHeader has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              function privReadCentralFileHeader(&$p_header)
                                              {
                                                $v_result=1;
                                            
                                                // ----- Read the 4 bytes signature
                                            Severity: Minor
                                            Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                              Function privAddFileList has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
                                                {
                                                  $v_result=1;
                                                  $v_header = array();
                                              
                                              
                                              Severity: Minor
                                              Found in wp-admin/includes/class-pclzip.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 PclZipUtilCopyBlock has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
                                                {
                                                  $v_result = 1;
                                              
                                                  if ($p_mode==0)
                                              Severity: Minor
                                              Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                Method PclZipUtilPathReduction has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  function PclZipUtilPathReduction($p_dir)
                                                  {
                                                    $v_result = "";
                                                
                                                    // ----- Look for not empty path
                                                Severity: Minor
                                                Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                  Method privExtractFileUsingTempFile has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                    function privExtractFileUsingTempFile(&$p_entry, &$p_options)
                                                    {
                                                      $v_result=1;
                                                  
                                                      // ----- Creates a temporary file
                                                  Severity: Minor
                                                  Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                    Method PclZipUtilPathInclusion has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                      function PclZipUtilPathInclusion($p_dir, $p_path)
                                                      {
                                                        $v_result = 1;
                                                    
                                                        // ----- Look for path beginning by ./
                                                    Severity: Minor
                                                    Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

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

                                                        function privMerge(&$p_archive_to_add)
                                                        {
                                                          $v_result=1;
                                                      
                                                          // ----- Look if the archive_to_add exists
                                                      Severity: Minor
                                                      Found in wp-admin/includes/class-pclzip.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 privList has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                        function privList(&$p_list)
                                                        {
                                                          $v_result=1;
                                                      
                                                          // ----- Magic quotes trick
                                                      Severity: Minor
                                                      Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                        Method errorName has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                          function errorName($p_with_code=false)
                                                          {
                                                            $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
                                                                              PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
                                                                              PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
                                                        Severity: Minor
                                                        Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                          Function privReadCentralFileHeader has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                            function privReadCentralFileHeader(&$p_header)
                                                            {
                                                              $v_result=1;
                                                          
                                                              // ----- Read the 4 bytes signature
                                                          Severity: Minor
                                                          Found in wp-admin/includes/class-pclzip.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

                                                          Function privDirCheck has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                            function privDirCheck($p_dir, $p_is_dir=false)
                                                            {
                                                              $v_result = 1;
                                                          
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in wp-admin/includes/class-pclzip.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 properties has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                            function properties()
                                                            {
                                                          
                                                              // ----- Reset the error handler
                                                              $this->privErrorReset();
                                                          Severity: Minor
                                                          Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                            Method privAddFileList has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                              function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
                                                              {
                                                                $v_result=1;
                                                                $v_header = array();
                                                            
                                                            
                                                            Severity: Minor
                                                            Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

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

                                                                function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
                                                                {
                                                                  $v_result=1;
                                                              
                                                                  // ----- Add the files
                                                              Severity: Minor
                                                              Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                                Method delete has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                  function delete()
                                                                  {
                                                                    $v_result=1;
                                                                
                                                                    // ----- Reset the error handler
                                                                Severity: Minor
                                                                Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                                  Method privDuplicate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                    function privDuplicate($p_archive_filename)
                                                                    {
                                                                      $v_result=1;
                                                                  
                                                                      // ----- Look if the $p_archive_filename exists
                                                                  Severity: Minor
                                                                  Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                                    Method privWriteCentralFileHeader has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                      function privWriteCentralFileHeader(&$p_header)
                                                                      {
                                                                        $v_result=1;
                                                                    
                                                                        // TBC
                                                                    Severity: Minor
                                                                    Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                                      Method privDirCheck has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                        function privDirCheck($p_dir, $p_is_dir=false)
                                                                        {
                                                                          $v_result = 1;
                                                                      
                                                                      
                                                                      
                                                                      Severity: Minor
                                                                      Found in wp-admin/includes/class-pclzip.php - About 1 hr to fix

                                                                        Function privAddList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                          function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
                                                                          {
                                                                            $v_result=1;
                                                                        
                                                                            // ----- Add the files
                                                                        Severity: Minor
                                                                        Found in wp-admin/includes/class-pclzip.php - About 55 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

                                                                        Function duplicate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                          function duplicate($p_archive)
                                                                          {
                                                                            $v_result = 1;
                                                                        
                                                                            // ----- Reset the error handler
                                                                        Severity: Minor
                                                                        Found in wp-admin/includes/class-pclzip.php - About 55 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

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

                                                                          function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
                                                                          {
                                                                            $v_result=PCLZIP_ERR_NO_ERROR;
                                                                        
                                                                            // ----- Working variable
                                                                        Severity: Minor
                                                                        Found in wp-admin/includes/class-pclzip.php - 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

                                                                        Method privExtractByRule has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                          function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
                                                                        Severity: Minor
                                                                        Found in wp-admin/includes/class-pclzip.php - About 35 mins to fix

                                                                          Method privExtractFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                            function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
                                                                          Severity: Minor
                                                                          Found in wp-admin/includes/class-pclzip.php - About 35 mins to fix

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

                                                                              function privReadFileHeader(&$p_header)
                                                                              {
                                                                                $v_result=1;
                                                                            
                                                                                // ----- Read the 4 bytes signature
                                                                            Severity: Minor
                                                                            Found in wp-admin/includes/class-pclzip.php - 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

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

                                                                              function privCheckFileHeaders(&$p_local_header, &$p_central_header)
                                                                              {
                                                                                $v_result=1;
                                                                            
                                                                                  // ----- Check the static values
                                                                            Severity: Minor
                                                                            Found in wp-admin/includes/class-pclzip.php - 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

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

                                                                              function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
                                                                              {
                                                                                if (stristr(php_uname(), 'windows')) {
                                                                                  // ----- Look for potential disk letter
                                                                                  if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
                                                                            Severity: Minor
                                                                            Found in wp-admin/includes/class-pclzip.php - 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

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

                                                                              function PclZipUtilRename($p_src, $p_dest)
                                                                              {
                                                                                $v_result = 1;
                                                                            
                                                                                // ----- Try to rename the files
                                                                            Severity: Minor
                                                                            Found in wp-admin/includes/class-pclzip.php - 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

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                    return(0);
                                                                            Severity: Major
                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                          return PclZip::errorCode();
                                                                              Severity: Major
                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                      return $v_result;
                                                                                Severity: Major
                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                            return $v_result;
                                                                                  Severity: Major
                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                return PclZip::errorCode();
                                                                                    Severity: Major
                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                            return PclZip::errorCode();
                                                                                      Severity: Major
                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                    return PclZip::errorCode();
                                                                                        Severity: Major
                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                        return PclZip::errorCode();
                                                                                          Severity: Major
                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                      return $v_result;
                                                                                            Severity: Major
                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                          return PclZip::errorCode();
                                                                                              Severity: Major
                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                  return PclZip::errorCode();
                                                                                                Severity: Major
                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return PclZip::errorCode();
                                                                                                  Severity: Major
                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                  return $v_result;
                                                                                                    Severity: Major
                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                  return PclZip::errorCode();
                                                                                                      Severity: Major
                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                            return $v_result;
                                                                                                        Severity: Major
                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                      return $v_result1;
                                                                                                          Severity: Major
                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                        return $v_result;
                                                                                                            Severity: Major
                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                          return $v_result;
                                                                                                              Severity: Major
                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                      return 0;
                                                                                                                Severity: Major
                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                                    return PclZip::errorCode();
                                                                                                                  Severity: Major
                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                              return $v_result;
                                                                                                                    Severity: Major
                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                    return PclZip::errorCode();
                                                                                                                      Severity: Major
                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                            return $v_result;
                                                                                                                        Severity: Major
                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                          return $v_result;
                                                                                                                          Severity: Major
                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                  return 0;
                                                                                                                            Severity: Major
                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                          return PclZip::errorCode();
                                                                                                                              Severity: Major
                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                            return PclZip::errorCode();
                                                                                                                                Severity: Major
                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                              return PclZip::errorCode();
                                                                                                                                  Severity: Major
                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                              return PclZip::errorCode();
                                                                                                                                    Severity: Major
                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                  return $v_result1;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                              return PclZip::errorCode();
                                                                                                                                        Severity: Major
                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                              return $p_result_list;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                        return PclZip::errorCode();
                                                                                                                                            Severity: Major
                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                              Open

                                                                                                                                                  return $v_result;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                Open

                                                                                                                                                    return $v_result;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                  Open

                                                                                                                                                              return PclZip::errorCode();
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                    Open

                                                                                                                                                          return PclZip::errorCode();
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                      Open

                                                                                                                                                                  return PclZip::errorCode();
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                        Open

                                                                                                                                                                    return PclZip::errorCode();
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                          Open

                                                                                                                                                                return $v_result;
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                            Open

                                                                                                                                                                return $v_result;
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                              Open

                                                                                                                                                                  return $v_result;
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                Open

                                                                                                                                                                      return $v_result;
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                  Open

                                                                                                                                                                              return PclZip::errorCode();
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                    Open

                                                                                                                                                                          return PclZip::errorCode();
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                      Open

                                                                                                                                                                                      return $v_result;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                        Open

                                                                                                                                                                              return $v_result;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                          Open

                                                                                                                                                                              return $p_result_list;
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                            Open

                                                                                                                                                                                return $p_list;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                              Open

                                                                                                                                                                                          return PclZip::errorCode();
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                Open

                                                                                                                                                                                            return PclZip::errorCode();
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                  Open

                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                    Open

                                                                                                                                                                                                return PclZip::errorCode();
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                  return PclZip::errorCode();
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    return $v_result;
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                          Open

                                                                                                                                                                                                      return $v_result;
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                            Open

                                                                                                                                                                                                  return $v_result;
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  return $p_list;
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                Open

                                                                                                                                                                                                    return $v_result;
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                  return PclZip::errorCode();
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                            return $v_result;
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                          return PclZip::errorCode();
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                            return PclZip::errorCode();
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                            return PclZip::errorCode();
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                return $v_result1;
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                    return $v_result;
                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                    return PclZip::errorCode();
                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                  return $v_result;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                              return PclZip::errorCode();
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                      return $v_result;
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                return PclZip::errorCode();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                  return $v_result;
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                    return PclZip::errorCode();
                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                          return $v_result;
                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                            Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                              return PclZip::errorCode();
                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                              Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                        return 0;
                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                  Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                          return 0;
                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                    Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                return $v_result;
                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                      Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                        return $v_result;
                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                        Found in wp-admin/includes/class-pclzip.php - About 30 mins to fix

                                                                                                                                                                                                                                                          Function merge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                            function merge($p_archive_to_add)
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                              $v_result = 1;
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              // ----- Reset the error handler
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 25 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

                                                                                                                                                                                                                                                          Function privList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                            function privList(&$p_list)
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                              $v_result=1;
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              // ----- Magic quotes trick
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 25 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

                                                                                                                                                                                                                                                          Function properties has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                            function properties()
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              // ----- Reset the error handler
                                                                                                                                                                                                                                                              $this->privErrorReset();
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 25 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

                                                                                                                                                                                                                                                          Function privOptionDefaultThreshold has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                            function privOptionDefaultThreshold(&$p_options)
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                              $v_result=1;
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php - About 25 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

                                                                                                                                                                                                                                                                else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
                                                                                                                                                                                                                                                                         && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                    if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
                                                                                                                                                                                                                                                                        $v_found = true;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 3411..3442

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

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
                                                                                                                                                                                                                                                                         && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                    if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
                                                                                                                                                                                                                                                                        $v_extract = true;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4812..4841

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

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                  case PCLZIP_OPT_PREPEND_COMMENT :
                                                                                                                                                                                                                                                                    // ----- Check the number of parameters
                                                                                                                                                                                                                                                                    if (($i+1) >= $p_size) {
                                                                                                                                                                                                                                                                      // ----- Error log
                                                                                                                                                                                                                                                                      PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1570..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 156.

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                  case PCLZIP_OPT_BY_PREG :
                                                                                                                                                                                                                                                                  //case PCLZIP_OPT_CRYPT :
                                                                                                                                                                                                                                                                    // ----- Check the number of parameters
                                                                                                                                                                                                                                                                    if (($i+1) >= $p_size) {
                                                                                                                                                                                                                                                                      // ----- Error log
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1598..1626

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

                                                                                                                                                                                                                                                          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 (1)
                                                                                                                                                                                                                                                              {
                                                                                                                                                                                                                                                                // ----- Extract time
                                                                                                                                                                                                                                                                $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
                                                                                                                                                                                                                                                                $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4366..4385

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

                                                                                                                                                                                                                                                          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 ($p_header['mdate'] && $p_header['mtime'])
                                                                                                                                                                                                                                                              {
                                                                                                                                                                                                                                                                // ----- Extract time
                                                                                                                                                                                                                                                                $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
                                                                                                                                                                                                                                                                $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4469..4488

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

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                  case PCLZIP_ATT_FILE_NAME :
                                                                                                                                                                                                                                                                    if (!is_string($v_value)) {
                                                                                                                                                                                                                                                                      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
                                                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1908..1920
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1922..1934

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

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                  case PCLZIP_ATT_FILE_NEW_SHORT_NAME :
                                                                                                                                                                                                                                                                    if (!is_string($v_value)) {
                                                                                                                                                                                                                                                                      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
                                                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1893..1906
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1922..1934

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

                                                                                                                                                                                                                                                          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

                                                                                                                                                                                                                                                                  case PCLZIP_ATT_FILE_NEW_FULL_NAME :
                                                                                                                                                                                                                                                                    if (!is_string($v_value)) {
                                                                                                                                                                                                                                                                      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
                                                                                                                                                                                                                                                                      return PclZip::errorCode();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1893..1906
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1908..1920

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

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

                                                                                                                                                                                                                                                              if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                // ----- Generate a local information
                                                                                                                                                                                                                                                                $v_local_header = array();
                                                                                                                                                                                                                                                                $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 3698..3724
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4069..4096

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

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

                                                                                                                                                                                                                                                              if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                // ----- Generate a local information
                                                                                                                                                                                                                                                                $v_local_header = array();
                                                                                                                                                                                                                                                                $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4069..4096
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4193..4219

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

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

                                                                                                                                                                                                                                                              if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                // ----- Generate a local information
                                                                                                                                                                                                                                                                $v_local_header = array();
                                                                                                                                                                                                                                                                $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 3698..3724
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4193..4219

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

                                                                                                                                                                                                                                                          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 ($v_requested_options !== false) {
                                                                                                                                                                                                                                                                  for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
                                                                                                                                                                                                                                                                    // ----- Look for mandatory option
                                                                                                                                                                                                                                                                    if ($v_requested_options[$key] == 'mandatory') {
                                                                                                                                                                                                                                                                      // ----- Look if present
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1798..1812

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

                                                                                                                                                                                                                                                          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 ($v_requested_options !== false) {
                                                                                                                                                                                                                                                                for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
                                                                                                                                                                                                                                                                  // ----- Look for mandatory option
                                                                                                                                                                                                                                                                  if ($v_requested_options[$key] == 'mandatory') {
                                                                                                                                                                                                                                                                    // ----- Look if present
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 1969..1980

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

                                                                                                                                                                                                                                                          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 ($p_entry['status'] == "aborted") {
                                                                                                                                                                                                                                                                $p_entry['status'] = "skipped";
                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              // ----- Look for post-extract callback
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 3944..3964

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

                                                                                                                                                                                                                                                          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 ($p_entry['status'] == "aborted") {
                                                                                                                                                                                                                                                                  $p_entry['status'] = "skipped";
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                              // ----- Look for post-extract callback
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in wp-admin/includes/class-pclzip.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                          wp-admin/includes/class-pclzip.php on lines 4142..4162

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

                                                                                                                                                                                                                                                          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