jkuchar/MultipleFileUpload

View on GitHub

Showing 205 of 353 total issues

Function _displayThumbs has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _displayThumbs: function() {
        var self = this
        , tw, th // thumb width/height
        , cols
        , num = 0 // number of simultaneously visible thumbs
Severity: Major
Found in public/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js - About 3 hrs to fix

    Function JPEGHeaders has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        return function JPEGHeaders(data) {
            var headers = [], read, idx, marker, length = 0;
    
            read = new BinaryReader();
            read.init(data);
    Severity: Major
    Found in public/plupload/js/moxie.js - About 3 hrs to fix

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

                  send: function(meta, data) {
                      var target = this, I = target.getRuntime(), uid, form, input, blob;
      
                      _status = _response = null;
      
      
      Severity: Major
      Found in public/plupload/js/moxie.js - About 3 hrs to fix

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

                    embed: function(el) {
                        var self = this
                        , imgCopy
                        , type, quality, crop
                        , options = arguments[1] || {}
        Severity: Major
        Found in public/plupload/js/moxie.js - About 3 hrs to fix

          Function addInput has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function addInput() {
                      var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid;
          
                      uid = Basic.guid('uid_');
          
          
          Severity: Major
          Found in public/plupload/js/moxie.js - About 3 hrs to fix

            Function _setOption has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function _setOption(option, value, init) {
                        var oldValue = settings[option];
            
                        switch (option) {
                            case 'max_file_size':
            Severity: Major
            Found in public/plupload/js/plupload.dev.js - About 3 hrs to fix

              Function settings has 82 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      settings : function(name, value, resetObjects) {
              
                          var args        = arguments;
                          var returnValue = value;
              
              
              Severity: Major
              Found in public/uploadify/js/jquery.uploadify-3.1.js - About 3 hrs to fix

                Function calculateMovingAverage has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    SWFUpload.speed.calculateMovingAverage = function (history) {
                        var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
                        var i;
                        var mSum = 0, mCount = 0;
                        
                Severity: Minor
                Found in public/swfupload/js/swfupload.speed.js - 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 Transporter has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function Transporter() {
                        var mod, _runtime, _data, _size, _pos, _chunk_size;
                
                        RuntimeClient.call(this);
                
                
                Severity: Major
                Found in public/plupload/js/moxie.js - About 3 hrs to fix

                  Function JPEG has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function JPEG(binstr) {
                          var _binstr, _br, _hm, _ep, _info, hasExif;
                  
                          function _getDimensions() {
                              var idx = 0, marker, length;
                  Severity: Major
                  Found in public/plupload/js/moxie.js - About 2 hrs to fix

                    Function Html5Runtime has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function Html5Runtime(options) {
                            var I = this
                            , Test = Runtime.capTest
                            , True = Runtime.capTrue
                            ;
                    Severity: Major
                    Found in public/plupload/js/moxie.js - About 2 hrs to fix

                      Function extractTags has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function extractTags(IFD_offset, tags2extract) {
                                  var length = data.SHORT(IFD_offset), i, ii,
                                      tag, type, count, tagOffset, offset, value, values = [], hash = {};
                      
                                  for (i = 0; i < length; i++) {
                      Severity: Major
                      Found in public/plupload/js/moxie.js - About 2 hrs to fix

                        Function exec has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    function exec(runtime) {
                                        _xhr.bind('LoadStart', function(e) {
                                            _p('readyState', XMLHttpRequest.LOADING);
                                            self.dispatchEvent('readystatechange');
                        
                        
                        Severity: Major
                        Found in public/plupload/js/moxie.js - About 2 hrs to fix

                          Function init has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      init: function(options) {
                                          var comp = this, I = comp.getRuntime(), input, shimContainer, mimes, browseButton, zIndex, top;
                          
                                          _options = options;
                                          _files = [];
                          Severity: Major
                          Found in public/plupload/js/moxie.js - About 2 hrs to fix

                            Function addFile has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    addFile : function(file, fileName) {
                                        var self = this
                                        , queue = [] 
                                        , filesAdded = []
                                        , ruid
                            Severity: Major
                            Found in public/plupload/js/plupload.dev.js - About 2 hrs to fix

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

                                  function version_compare(v1, v2, operator) {
                                    // From: http://phpjs.org/functions
                                    // +      original by: Philippe Jausions (http://pear.php.net/user/jausions)
                                    // +      original by: Aidan Lister (http://aidanlister.com/)
                                    // + reimplemented by: Kankrelune (http://www.webfaktory.info/)
                              Severity: Major
                              Found in public/plupload/js/moxie.js - About 2 hrs to fix

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

                                    function Blob(ruid, blob) {
                                
                                        function _sliceDetached(start, end, type) {
                                            var blob, data = blobpool[this.uid];
                                
                                
                                Severity: Major
                                Found in public/plupload/js/moxie.js - About 2 hrs to fix

                                  Function RuntimeClient has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      return function RuntimeClient() {
                                          var runtime;
                                  
                                          Basic.extend(this, {
                                              /**
                                  Severity: Major
                                  Found in public/plupload/js/moxie.js - About 2 hrs to fix

                                    MultipleFileUpload has 23 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class MultipleFileUpload extends UploadControl
                                    {
                                        /**
                                         * Is files handle uploads called?
                                         * @var bool
                                    Severity: Minor
                                    Found in MultipleFileUpload/MultipleFileUpload.php - About 2 hrs to fix

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

                                              send: function(meta, data) {
                                                  var target = this, self = target.getRuntime();
                                      
                                                  function send() {
                                                      meta.transport = self.mode;
                                      Severity: Major
                                      Found in public/plupload/js/moxie.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language