XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

File tag-it.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
* jQuery UI Tag-it!
*
* @version v2.0 (06/2011)
*
Severity: Minor
Found in assets/js/tag-it.js - About 5 hrs to fix

    Function embedCode has 136 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function embedCode(container, externalUrl, embedProvider) {
            if (xoops_smallworld('#jqoembeddata').data(externalUrl) != undefined && embedProvider.embedtag.tag != 'iframe') {
                var oembedData = {code: xoops_smallworld('#jqoembeddata').data(externalUrl)};
                success(oembedData, externalUrl, container);
            } else if (embedProvider.yql) {
    Severity: Major
    Found in assets/js/jquery.oembed.js - About 5 hrs to fix

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

          _create: function() {
      
              var n, i, handle, axis, hname,
                  that = this,
                  o = this.options;
      Severity: Major
      Found in assets/js/jqueryui.min.js - About 5 hrs to fix

        Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.Callbacks = function( options ) {
        
            // Convert options from String-formatted to Object-formatted if needed
            // (we check in cache first)
            options = typeof options === "string" ?
        Severity: Major
        Found in assets/js/jquery.min.js - About 5 hrs to fix

          Function md5 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          String.prototype.md5 = function () {
              var a = function (a, b) {
                  var c = (a & 65535) + (b & 65535);
                  var d = (a >> 16) + (b >> 16) + (c >> 16);
                  return d << 16 | c & 65535
          Severity: Major
          Found in assets/js/jquery.oembed.js - About 5 hrs to fix

            Method sendMails has 126 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function sendMails($fromUserId, $toUserId, $event, $link, array $data)
                {
                    $date    = date('m-d-Y H:i:s', time());
                    $mail    = new \XoopsMultiMailer();
                    $wall    = new WallUpdates();
            Severity: Major
            Found in class/Mail.php - About 5 hrs to fix

              Function prep has 125 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  publicMethod.prep = function (object) {
                      if (!open) {
                          return;
                      }
              
              
              Severity: Major
              Found in assets/js/jquery.colorbox.js - About 5 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                            if ( event.pageX == null && original.clientX != null ) {
                                eventDoc = event.target.ownerDocument || document;
                                doc = eventDoc.documentElement;
                                body = eventDoc.body;
                
                
                Severity: Critical
                Found in assets/js/jquery.min.js - About 5 hrs to fix

                  Function fetchURL has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function fetchURL($url, $methods = ['fopen', 'curl', 'socket'])
                      {
                          /**
                           *   December 21st 2010, Mathew Tinsley (tinsley@tinsology.net)
                           *   http://tinsology.net
                  Severity: Minor
                  Found in class/Admin.php - About 4 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 handle_file_upload has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function handle_file_upload(
                          $uploaded_file,
                          $name,
                          $size,
                          $type,
                  Severity: Minor
                  Found in class/UploadHandler.php - About 4 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 parseDate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          parseDate: function (format, value, settings) {
                              if (format == null || value == null)
                                  throw 'Invalid arguments';
                              value = (typeof value == 'object' ? value.toString() : value + '');
                              if (value == '')
                  Severity: Major
                  Found in assets/js/jquery-ui-1.8.11.custom.js - About 4 hrs to fix

                    File bootstrap-image-gallery.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * Bootstrap Image Gallery 2.10
                     * https://github.com/blueimp/Bootstrap-Image-Gallery
                     *
                     * Copyright 2011, Sebastian Tschan
                    Severity: Minor
                    Found in assets/js/uploader/bootstrap-image-gallery.js - About 4 hrs to fix

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

                          _create: function() {
                              this.element.closest( "form" )
                                  .unbind( "reset" + this.eventNamespace )
                                  .bind( "reset" + this.eventNamespace, formResetHandler );
                      
                      
                      Severity: Major
                      Found in assets/js/jqueryui.min.js - About 4 hrs to fix

                        Function position has 110 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/jquery-ui-1.8.11.custom.js - About 4 hrs to fix

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

                                  _create: function () {
                                      this.element.closest("form")
                                          .unbind("reset.button")
                                          .bind("reset.button", formResetHandler);
                          
                          
                          Severity: Major
                          Found in assets/js/jquery-ui-1.8.11.custom.js - About 4 hrs to fix

                            File WallUpdates.php has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

                              Function apprise has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function apprise(string, args, callback) {
                                  var default_args =
                                      {
                                          'confirm': false,         // Ok and Cancel buttons
                                          'verify': false,        // Yes and No buttons
                              Severity: Major
                              Found in assets/js/apprise-1.5.full.js - About 4 hrs to fix

                                File ajaxupload.3.5.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * Ajax upload
                                 * Project page - http://valums.com/ajax-upload/
                                 * Copyright (c) 2008 Andris Valums, http://valums.com
                                 * Licensed under the MIT license (http://valums.com/mit-license/)
                                Severity: Minor
                                Found in assets/js/ajaxupload.3.5.js - About 4 hrs to fix

                                  Function apprise has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function apprise(string, args, callback) {
                                      var default_args =
                                          {
                                              'confirm': false,         // Ok and Cancel buttons
                                              'verify': false,        // Yes and No buttons
                                  Severity: Minor
                                  Found in assets/js/apprise-1.5.full.js - About 4 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 uaMatch has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function uaMatch( ua ) {
                                      // If an UA is not provided, default to the current browser UA.
                                      if ( ua === undefined ) {
                                        ua = window.navigator.userAgent;
                                      }
                                  Severity: Major
                                  Found in assets/js/jquery.bookmark.js - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language