XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

Function stepy has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    xoops_smallworld.fn.stepy = function (settings) {

        if (this.length == 0) {
            //debug('Selector invalid or missing!');
            return;
Severity: Major
Found in assets/js/jquery.stepy.js - About 1 day to fix

    Function _create has 203 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _create: function() {
            // Some browsers only repeat keydown events, not keypress events,
            // so we use the suppressKeyPress flag to determine if we've already
            // handled the keydown event. #7269
            // Unfortunately the code for & in keypress is the same as the up arrow,
    Severity: Major
    Found in assets/js/jqueryui.min.js - About 1 day to fix

      File jquery.bookmark.js has 482 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* http://keith-wood.name/bookmark.html
          Sharing bookmarks for jQuery v1.4.0.
          Written by Keith Wood (kbwood{at}iinet.com.au) March 2008.
          Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
          MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
      Severity: Minor
      Found in assets/js/jquery.bookmark.js - About 7 hrs to fix

        File SwDatabase.php has 455 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace XoopsModules\Smallworld;
        
        /*
        Severity: Minor
        Found in class/SwDatabase.php - About 6 hrs to fix

          Function _generateHTML has 171 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _generateHTML: function (inst) {
                      var today = new Date();
                      today = this._daylightSavingAdjust(
                          new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
                      var isRTL = this._get(inst, 'isRTL');
          Severity: Major
          Found in assets/js/jquery-ui-1.8.11.custom.js - About 6 hrs to fix

            Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _generateHTML: function(inst) {
                    var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                        controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                        monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                        selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
            Severity: Major
            Found in assets/js/jqueryui.min.js - About 6 hrs to fix

              Method showUser has 167 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function showUser($id)
                  {
                      global $arr04, $arr05;
                      $id = (int)$id;
                      if ($GLOBALS['xoopsUser'] && $GLOBALS['xoopsUser'] instanceof \XoopsUser) {
              Severity: Major
              Found in class/Profile.php - About 6 hrs to fix

                File jssocials.js has 442 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*! jssocials - v1.5.0 - 2017-04-30
                * http://js-socials.com
                * Copyright (c) 2017 Artem Tabalin; Licensed MIT */
                (function(window, $, undefined) {
                
                
                Severity: Minor
                Found in assets/js/jssocials.js - About 6 hrs to fix

                  File jquery.form.js has 437 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                   * jQuery Form Plugin
                   * version: 2.43 (12-MAR-2010)
                   * @requires jQuery v1.3.2 or later
                   *
                  Severity: Minor
                  Found in assets/js/jquery.form.js - About 6 hrs to fix

                    Function fileUpload has 162 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function fileUpload() {
                                var form = $form[0];
                    
                                if ($(':input[name=submit]', form).length) {
                                    alert('Error: Form elements must not be named "submit".');
                    Severity: Major
                    Found in assets/js/jquery.form.js - About 6 hrs to fix

                      Function historyCheck has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                      Open

                          historyCheck: function () {
                              // if ((xoops_smallworld.browser.msie) && (xoops_smallworld.browser.version < 8)) {
                              if (xoops_smallworld.browser.msie) {
                                  // On IE, check for location.hash of iframe
                                  var ihistory = xoops_smallworld("#xoops_smallworld_history")[0];
                      Severity: Minor
                      Found in assets/js/jquery.history.js - 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

                      Function _create has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _create: function () {
                                  var self = this,
                                      o = this.options;
                      
                                  this._keySliding = false;
                      Severity: Major
                      Found in assets/js/jquery-ui-1.8.11.custom.js - About 6 hrs to fix

                        Function size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var effectSize = $.effects.effect.size = function( o, done ) {
                        
                            // Create element
                            var original, baseline, factor,
                                el = $( this ),
                        Severity: Major
                        Found in assets/js/jqueryui.min.js - About 6 hrs to fix

                          Function parseDate has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              parseDate: function (format, value, settings) {
                                  if (format == null || value == null) {
                                      throw "Invalid arguments";
                                  }
                          
                          
                          Severity: Major
                          Found in assets/js/jqueryui.min.js - About 5 hrs to fix

                            Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            $.fn.position = function( options ) {
                                if ( !options || !options.of ) {
                                    return _position.apply( this, arguments );
                                }
                            
                            
                            Severity: Major
                            Found in assets/js/jqueryui.min.js - About 5 hrs to fix

                              Function _create has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _create: function () {
                                          var self = this,
                                              doc = this.element[0].ownerDocument,
                                              suppressKeyPress;
                              
                              
                              Severity: Major
                              Found in assets/js/jquery-ui-1.8.11.custom.js - About 5 hrs to fix

                                File blocksadmin.php has 406 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /*
                                 * You may not change or alter any portion of this comment or credits
                                 * of supporting developers from this source code or any supporting source code
                                 * which is considered copyrighted (c) material of the original comment or credit authors.
                                Severity: Minor
                                Found in admin/blocksadmin.php - About 5 hrs to fix

                                  UploadHandler has 42 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class UploadHandler
                                  {
                                      protected $options;
                                  
                                      // PHP File Upload error message codes:
                                  Severity: Minor
                                  Found in class/UploadHandler.php - About 5 hrs to fix

                                    Function _create has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            _create: function () {
                                                // for handling static scoping inside callbacks
                                                var that = this;
                                    
                                                // There are 2 kinds of DOM nodes this widget can be instantiated on:
                                    Severity: Major
                                    Found in assets/js/tag-it.js - About 5 hrs to fix

                                      Method smallworld_includeScripts has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function smallworld_includeScripts()
                                      {
                                          /** @var \XoopsModules\Smallworld\Helper $helper */
                                          $helper = Helper::getInstance();
                                          $page = basename($_SERVER['PHP_SELF'], '.php');
                                      Severity: Major
                                      Found in include/functions.php - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language