mambax7/xnewsletter

View on GitHub

Showing 283 of 379 total issues

File bmh.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * ****************************************************************************
 *  - A Project by Developers TEAM For Xoops - ( https://xoops.org )
 * ****************************************************************************
Severity: Minor
Found in admin/bmh.php - About 2 hrs to fix

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

        public function getForm($action = false, $system = 0)
        {
            global $xoopsDB;
    
            if (false === $action) {
    Severity: Minor
    Found in class/Mailinglist.php - About 2 hrs to fix

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

          public function setLanguage($langcode = 'en', $lang_path = '')
          {
              // Backwards compatibility for renamed language codes
              $renamed_langcodes = [
                  'br' => 'pt_br',
      Severity: Minor
      Found in include/phpmailer/class.phpmailer.php - About 1 hr to fix

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

        function xnewsletter_plugin_getdata_evennews($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
        {
            global $xoopsDB;
            $helper = Xnewsletter\Helper::getInstance();
        
        
        Severity: Minor
        Found in plugins/evennews.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 xnewsletter_plugin_getdata_rmbulletin has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_rmbulletin($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
        {
            global $xoopsDB;
            $helper = Xnewsletter\Helper::getInstance();
        
        
        Severity: Minor
        Found in plugins/rmbulletin.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 xnewsletter_plugin_getdata_xoopsuser has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_xoopsuser(
            $cat_id,
            $action_after_read,
            $limitCheck,
            $skipCatsubscrExist,
        Severity: Minor
        Found in plugins/xoopsuser.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 xnewsletter_plugin_getdata_smartpartner has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_smartpartner($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
        {
            global $xoopsDB;
            $helper = Xnewsletter\Helper::getInstance();
        
        
        Severity: Minor
        Found in plugins/smartpartner.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 xnewsletter_plugin_getdata_weblinks has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_weblinks($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
        {
            global $xoopsDB;
            $helper = Xnewsletter\Helper::getInstance();
        
        
        Severity: Minor
        Found in plugins/weblinks.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 xnewsletter_plugin_getdata_subscribers has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_subscribers($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
        {
            global $xoopsDB;
            $helper = Xnewsletter\Helper::getInstance();
        
        
        Severity: Minor
        Found in plugins/subscribers.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 globalDelete has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public function globalDelete()
            {
                $dateArr = explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd
                $delDate = mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]);
        
        
        Severity: Minor
        Found in include/phpmailer_bmh/class.phpmailer-bmh.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 xnewsletter_plugin_getdata_xoopsuser has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xnewsletter_plugin_getdata_xoopsuser(
            $cat_id,
            $action_after_read,
            $limitCheck,
            $skipCatsubscrExist,
        Severity: Minor
        Found in plugins/xoopsuser.php - About 1 hr to fix

          Method xnewsletter_plugin_getdata_csv has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function xnewsletter_plugin_getdata_csv(
              $cat_id,
              $action_after_read,
              $limitCheck,
              $skipCatsubscrExist,
          Severity: Minor
          Found in plugins/csv.php - About 1 hr to fix

            Method getForm has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getForm($action = false)
                {
                    global $xoopsDB;
            
                    if (false === $action) {
            Severity: Minor
            Found in class/Template.php - About 1 hr to fix

              Method xnewsletter_plugin_getdata_subscribers has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function xnewsletter_plugin_getdata_subscribers($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
              {
                  global $xoopsDB;
                  $helper = Xnewsletter\Helper::getInstance();
              
              
              Severity: Minor
              Found in plugins/subscribers.php - About 1 hr to fix

                Method msgHTML has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function msgHTML($message, $basedir = '', $advanced = false)
                    {
                        preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
                        if (array_key_exists(2, $images)) {
                            if (mb_strlen($basedir) > 1 && '/' != mb_substr($basedir, -1)) {
                Severity: Minor
                Found in include/phpmailer/class.phpmailer.php - About 1 hr to fix

                  Method xnewsletter_plugin_getdata_evennews has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function xnewsletter_plugin_getdata_evennews($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
                  {
                      global $xoopsDB;
                      $helper = Xnewsletter\Helper::getInstance();
                  
                  
                  Severity: Minor
                  Found in plugins/evennews.php - About 1 hr to fix

                    Method xnewsletter_plugin_getdata_smartpartner has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function xnewsletter_plugin_getdata_smartpartner($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
                    {
                        global $xoopsDB;
                        $helper = Xnewsletter\Helper::getInstance();
                    
                    
                    Severity: Minor
                    Found in plugins/smartpartner.php - About 1 hr to fix

                      Method xnewsletter_plugin_getdata_weblinks has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function xnewsletter_plugin_getdata_weblinks($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
                      {
                          global $xoopsDB;
                          $helper = Xnewsletter\Helper::getInstance();
                      
                      
                      Severity: Minor
                      Found in plugins/weblinks.php - About 1 hr to fix

                        Method xnewsletter_plugin_getdata_rmbulletin has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function xnewsletter_plugin_getdata_rmbulletin($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist)
                        {
                            global $xoopsDB;
                            $helper = Xnewsletter\Helper::getInstance();
                        
                        
                        Severity: Minor
                        Found in plugins/rmbulletin.php - About 1 hr to fix

                          Method b_xnewsletter_catsubscr has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function b_xnewsletter_catsubscr($options)
                          {
                              global $xoopsUser;
                              $helper = Xnewsletter\Helper::getInstance();
                              $myts   = \MyTextSanitizer::getInstance();
                          Severity: Minor
                          Found in blocks/blocks_catsubscr.php - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language