mambax7/xnewsletter

View on GitHub

Showing 283 of 379 total issues

File class.phpmailer.php has 2188 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * PHPMailer - PHP email creation and transport class.
 * PHP Version 5
 * @package   PHPMailer
Severity: Major
Found in include/phpmailer/class.phpmailer.php - About 6 days to fix

    Method bmhDSNRules has 886 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function bmhDSNRules($dsn_msg, $dsn_report, $debug_mode = false): array
    {
        global $rule_categories;
        global $bmh_newline;
    
    
    Severity: Major
    Found in include/phpmailer_bmh/phpmailer-bmh_rules.php - About 4 days to fix

      File phpmailer-bmh_rules.php has 1318 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /*~ phpmailer-bmh_rules.php
      .---------------------------------------------------------------------------.
      |  Software: PHPMailer-BMH (Bounce Mail Handler)                            |
      Severity: Major
      Found in include/phpmailer_bmh/phpmailer-bmh_rules.php - About 3 days to fix

        Function bmhDSNRules has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring.
        Open

        function bmhDSNRules($dsn_msg, $dsn_report, $debug_mode = false): array
        {
            global $rule_categories;
            global $bmh_newline;
        
        
        Severity: Minor
        Found in include/phpmailer_bmh/phpmailer-bmh_rules.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 tln_sanitize has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
        Open

        function tln_sanitize(
            $body,
            $tag_list,
            $rm_tags_with_content,
            $self_closing_tags,
        Severity: Minor
        Found in include/phpmailer/extras/htmlfilter.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

        File subscription.php has 857 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * ****************************************************************************
         *  - A Project by Developers TEAM For Xoops - ( https://xoops.org )
         * ****************************************************************************
        Severity: Major
        Found in subscription.php - About 2 days to fix

          Method bmhBodyRules has 402 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function bmhBodyRules($body, /** @noinspection PhpUnusedParameterInspection */ $structure, $debug_mode = false): array
          {
              global $rule_categories;
              global $bmh_newline;
          
          
          Severity: Major
          Found in include/phpmailer_bmh/phpmailer-bmh_rules.php - About 2 days to fix

            Function xnewsletter_executeTasks has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
            Open

            function xnewsletter_executeTasks($xn_send_in_packages, $letter_id = 0, $cron = 0)
            {
                require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/functions.php';
            //    require_once XNEWSLETTER_ROOT_PATH . '/class/class.xnewslettermailer.php';
            
            
            Severity: Minor
            Found in include/task.inc.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

            PHPMailer has 103 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class PHPMailer
            {
                /**
                 * The PHPMailer Version number.
                 * @var string
            Severity: Major
            Found in include/phpmailer/class.phpmailer.php - About 1 day to fix

              File htmlfilter.php has 690 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * htmlfilter.inc
               * ---------------
               * This set of functions allows you to filter html in order to remove
              Severity: Major
              Found in include/phpmailer/extras/htmlfilter.php - About 1 day to fix

                Method xnewsletter_executeTasks has 303 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function xnewsletter_executeTasks($xn_send_in_packages, $letter_id = 0, $cron = 0)
                {
                    require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/functions.php';
                //    require_once XNEWSLETTER_ROOT_PATH . '/class/class.xnewslettermailer.php';
                
                
                Severity: Major
                Found in include/task.inc.php - About 1 day to fix

                  Function xnewsletter_setPost has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function xnewsletter_setPost($contentObj, $sets)
                  {
                      if (!is_object($contentObj)) {
                          return false;
                      }
                  Severity: Minor
                  Found in include/functions.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

                  File class.smtp.php has 558 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * PHPMailer RFC821 SMTP email transport class.
                   * PHP Version 5
                   * @package   PHPMailer
                  Severity: Major
                  Found in include/phpmailer/class.smtp.php - About 1 day to fix

                    Function wrapText has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function wrapText($message, $length, $qp_mode = false)
                        {
                            if ($qp_mode) {
                                $soft_break = sprintf(' =%s', $this->LE);
                            } else {
                    Severity: Minor
                    Found in include/phpmailer/class.phpmailer.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

                    File functions.php has 540 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * ****************************************************************************
                     *  - A Project by Developers TEAM For Xoops - ( https://xoops.org )
                     * ****************************************************************************
                    Severity: Major
                    Found in include/functions.php - About 1 day to fix

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

                          public function processMailbox($max = false)
                          {
                              if (empty($this->action_function) || !function_exists($this->action_function)) {
                                  $this->error_msg = 'Action function not found!';
                                  $this->output();
                      Severity: Minor
                      Found in include/phpmailer_bmh/class.phpmailer-bmh.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 tln_getnxtag has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function tln_getnxtag($body, $offset)
                      {
                          if ($offset > mb_strlen($body)) {
                              return false;
                          }
                      Severity: Minor
                      Found in include/phpmailer/extras/htmlfilter.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 bmhBodyRules has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function bmhBodyRules($body, /** @noinspection PhpUnusedParameterInspection */ $structure, $debug_mode = false): array
                      {
                          global $rule_categories;
                          global $bmh_newline;
                      
                      
                      Severity: Minor
                      Found in include/phpmailer_bmh/phpmailer-bmh_rules.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 tln_fixatts has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function tln_fixatts(
                          $tagname,
                          $attary,
                          $rm_attnames,
                          $bad_attvals,
                      Severity: Minor
                      Found in include/phpmailer/extras/htmlfilter.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

                      File letter.php has 517 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * ****************************************************************************
                       *  - A Project by Developers TEAM For Xoops - ( https://xoops.org )
                       * ****************************************************************************
                      Severity: Major
                      Found in letter.php - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language