ImpressCMS/impresscms

View on GitHub

Showing 540 of 47,256 total issues

Method b_system_admin_warnings_show has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function b_system_admin_warnings_show() {
    $block = array();
    $block['msg'] = array();

    // Check if PDO is being used - if not, issue a warning, because it is being removed from PHP
Severity: Major
Found in htdocs/modules/system/blocks/system_admin_blocks.php - About 2 hrs to fix

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

    var Enumerable = (function() {
        function each(iterator, context) {
            try {
                this._each(iterator, context);
            } catch (e) {
    Severity: Minor
    Found in htdocs/install/prototype.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    function TCGenerateMac() {
        var s = '';
        var c = 0,n = 1;
        var r,g,b;
        for (j = 0; j < 15; j ++) {
    Severity: Minor
    Found in htdocs/include/color-picker.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

        function protector_onuninstall_base($module, $mydirname) {
            // transations on module uninstall
            global $ret; // TODO :-D
    
            if (!is_array($ret)) $ret = array ();

    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 imanager_addcat has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    function imanager_addcat() {
        if (!icms::$security->check()) {
            redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
        }
    
    
    Severity: Minor
    Found in htdocs/modules/system/admin/images/main.php - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
            var bySet = setMatchers.length > 0,
                byElement = elementMatchers.length > 0,
                superMatcher = function( seed, context, xml, results, outermost ) {
                    var elem, j, matcher,
    Severity: Major
    Found in htdocs/install/prototype.js - About 2 hrs to fix

      Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
              if ( postFilter && !postFilter[ expando ] ) {
                  postFilter = setMatcher( postFilter );
              }
              if ( postFinder && !postFinder[ expando ] ) {
      Severity: Major
      Found in htdocs/install/prototype.js - About 2 hrs to fix

        File users.php has 276 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        // $Id: users.php 12313 2013-09-15 21:14:35Z skenow $
        //  ------------------------------------------------------------------------ //
        //                XOOPS - PHP Content Management System                      //
        //                    Copyright (c) 2000 XOOPS.org                           //
        Severity: Minor
        Found in htdocs/modules/system/admin/users/users.php - About 2 hrs to fix

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

          function xoops_module_deactivate($mid) {
              global $icms_page_handler, $icms_block_handler, $icmsConfig, $icmsAdminTpl;
              if (!isset($icms_page_handler)) {
                  $icms_page_handler = icms_getModuleHandler('pages', 'system');
              }
          Severity: Minor
          Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

          function adminNav($id = NULL, $separador = "/", $list = FALSE, $style = "style='font-weight:bold'") {
              global $target, $type;
          
              $admin_url = 'browser.php?target=' . $target . '&type=' . $type;
              if ($id === FALSE) {
          Severity: Minor
          Found in htdocs/modules/system/admin/images/browser.php - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

          function adminNav($id = NULL, $separador = "/", $list = FALSE, $style = "style='font-weight:bold'") {
              $admin_url = ICMS_MODULES_URL . "/system/admin.php?fct=images";
              if ($id === FALSE) {
                  return FALSE;
              } else {
          Severity: Minor
          Found in htdocs/modules/system/admin/images/main.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 imanager_addcat has 64 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function imanager_addcat() {
              /* because we're using a function, the GET/POST variables are not in scope */
              global $imgcat_pid, $imgcat_name, $imgcat_maxsize;
              global $imgcat_maxwidth, $imgcat_maxheight, $imgcat_display;
              global $imgcat_weight, $imgcat_storetype, $imgcat_foldername;
          Severity: Major
          Found in htdocs/modules/system/admin/images/browser.php - About 2 hrs to fix

            File main.php has 272 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            // $Id: main.php 12313 2013-09-15 21:14:35Z skenow $
            //  ------------------------------------------------------------------------ //
            //                XOOPS - PHP Content Management System                      //
            //                    Copyright (c) 2000 XOOPS.org                           //
            Severity: Minor
            Found in htdocs/modules/system/admin/groups/main.php - About 2 hrs to fix

              Function Class has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Class = (function() {
              
                  var IS_DONTENUM_BUGGY = (function(){
                      for (var p in { toString: 1 }) {
                          if (p === 'toString') return false;
              Severity: Major
              Found in htdocs/install/prototype.js - About 2 hrs to fix

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

                    function protector_onupdate_base($module, $mydirname) {
                        // transations on module update
                        global $msgs; // TODO :-D
                
                        if (!is_array($msgs)) $msgs = array ();

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

                  function imanager_addfile() {
                      if (!icms::$security->check()) {
                          redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
                      }
                  
                  
                  Severity: Major
                  Found in htdocs/modules/system/admin/images/main.php - About 2 hrs to fix

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

                    function imanager_addfile() {
                        /* because we are using a function, the GET/POST variables are not in scope */
                        global $imgcat_id, $image_display, $image_weight, $image_nicename;
                    
                        if (!icms::$security->check()) {
                    Severity: Major
                    Found in htdocs/modules/system/admin/images/browser.php - About 2 hrs to fix

                      Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  superMatcher = function( seed, context, xml, results, outermost ) {
                                      var elem, j, matcher,
                                          matchedCount = 0,
                                          i = "0",
                                          unmatched = seed && [],
                      Severity: Major
                      Found in htdocs/install/prototype.js - About 2 hrs to fix

                        Method queryFromFile has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function queryFromFile($sql_file_path) {
                                $tables = array();
                        
                                if (!file_exists($sql_file_path)) {
                                    return false;
                        Severity: Major
                        Found in htdocs/install/class/dbmanager.php - About 2 hrs to fix

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

                          function xoopsCodeText(id, hiddentext, enterTextboxPhrase){
                              var textareaDom = xoopsGetElementById(id);
                              var textDom = xoopsGetElementById(id + "Addtext");
                              var fontDom = xoopsGetElementById(id + "Font");
                              var colorDom = xoopsGetElementById(id + "Color");
                          Severity: Minor
                          Found in htdocs/include/xoops.js - 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

                          Severity
                          Category
                          Status
                          Source
                          Language