XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

Function defaultPrefilter has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function defaultPrefilter( elem, props, opts ) {
    /* jshint validthis: true */
    var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
        anim = this,
        orig = {},
Severity: Major
Found in assets/js/jquery.min.js - About 4 hrs to fix

    File main.php has 334 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
    Severity: Minor
    Found in language/french/main.php - About 4 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                      if (!((l - d < x1 && x1 < r + d && t - d < y1 && y1 < b + d) || (l - d < x1 && x1 < r + d && t - d < y2 && y2 < b + d) || (l - d < x2 && x2 < r + d && t - d < y1 && y1 < b + d) || (l - d < x2 && x2 < r + d && t - d < y2 && y2 < b + d))) {
                          if (inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), {snapItem: inst.snapElements[i].item})));
                          inst.snapElements[i].snapping = false;
                          continue;
                      }
      Severity: Critical
      Found in assets/js/jquery-ui-1.8.11.custom.js - About 4 hrs to fix

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

            public function handlePosts()
            {
                $GLOBALS['xoopsLogger']->activated = false;
                if ($GLOBALS['xoopsUser'] && $GLOBALS['xoopsUser'] instanceof \XoopsUser) {
                    $uid = $GLOBALS['xoopsUser']->uid();
        Severity: Major
        Found in class/SwDatabase.php - About 3 hrs to fix

          File main.php has 331 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 language/english/main.php - About 3 hrs to fix

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

                    _create: function () {
                        this.originalTitle = this.element.attr('title');
                        // #5742 - .attr() might return a DOMElement
                        if (typeof this.originalTitle !== "string") {
                            this.originalTitle = "";
            Severity: Major
            Found in assets/js/jquery-ui-1.8.11.custom.js - About 3 hrs to fix

              Function Bookmark has 94 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Bookmark() {
                  this._defaults = {
                      url: '',    // The URL to bookmark, leave blank for the current page
                      sourceTag: '', // Extra tag to add to URL to indicate source when it returns
                      title: '',    // The title to bookmark, leave blank for the current one
              Severity: Major
              Found in assets/js/jquery.bookmark.js - About 3 hrs to fix

                Function load has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function load() {
                        var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
                
                        active = true;
                
                
                Severity: Major
                Found in assets/js/jquery.colorbox.js - About 3 hrs to fix

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

                          _create: function () {
                  
                              var self = this, o = this.options;
                              this.element.addClass("ui-resizable");
                  
                  
                  Severity: Major
                  Found in assets/js/jquery-ui-1.8.11.custom.js - About 3 hrs to fix

                    File main.php has 322 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
                    Severity: Minor
                    Found in language/danish/main.php - About 3 hrs to fix

                      File tags.php has 319 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 tags.php - About 3 hrs to fix

                        File PublicWallUpdates.php has 317 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

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

                          function smallworld_time_stamp($session_time)
                          {
                              $time_difference = time() - $session_time;
                              $seconds         = $time_difference;
                              $minutes         = round($time_difference / 60);
                          Severity: Minor
                          Found in include/functions.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 showUser has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function showUser($id)
                              {
                                  global $arr04, $arr05;
                                  $id = (int)$id;
                                  if ($GLOBALS['xoopsUser'] && $GLOBALS['xoopsUser'] instanceof \XoopsUser) {
                          Severity: Minor
                          Found in class/Profile.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 trigger has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              trigger: function( event, data, elem, onlyHandlers ) {
                                  var handle, ontype, cur,
                                      bubbleType, special, tmp, i,
                                      eventPath = [ elem || document ],
                                      type = hasOwn.call( event, "type" ) ? event.type : event,
                          Severity: Major
                          Found in assets/js/jquery.min.js - About 3 hrs to fix

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

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

                              Method parsePubArray has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function parsePubArray($updatesarray, $id)
                                  {
                                      /**
                                       * @var \XoopsModules\Smallworld\Helper $helper
                                       * @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
                              Severity: Major
                              Found in class/PublicWallUpdates.php - About 3 hrs to fix

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

                                /**
                                 * jQuery Stepy - A Wizard Plugin - http://wbotelhos.com/stepy
                                 * ---------------------------------------------------------------------------------
                                 *
                                 * jQuery Stepy is a plugin based on FormToWizard that generates a customizable wizard.
                                Severity: Minor
                                Found in assets/js/jquery.stepy.js - About 3 hrs to fix

                                  Function oembed has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      xoops_smallworld.fn.oembed = function (url, options, embedAction) {
                                  
                                          settings = xoops_smallworld.extend(true, xoops_smallworld.fn.oembed.defaults, options);
                                          var shortURLList = ["0rz.tw", "1link.in", "1url.com", "2.gp", "2big.at", "2tu.us", "3.ly", "307.to", "4ms.me", "4sq.com", "4url.cc", "6url.com", "7.ly", "a.gg", "a.nf", "aa.cx", "abcurl.net",
                                              "ad.vu", "adf.ly", "adjix.com", "afx.cc", "all.fuseurl.com", "alturl.com", "amzn.to", "ar.gy", "arst.ch", "atu.ca", "azc.cc", "b23.ru", "b2l.me", "bacn.me", "bcool.bz", "binged.it",
                                  Severity: Major
                                  Found in assets/js/jquery.oembed.js - About 3 hrs to fix

                                    Function _calculatePeriods has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            _calculatePeriods: function (inst, show, significant, now) {
                                                // Find endpoints
                                                inst._now = now;
                                                inst._now.setMilliseconds(0);
                                                var until = new Date(inst._now.getTime());
                                    Severity: Major
                                    Found in assets/js/jquery.countdown.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language