jkuchar/MultipleFileUpload

View on GitHub

Showing 353 of 353 total issues

File moxie.js has 6042 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
 * v1.2.1
 *
 * Copyright 2013, Moxiecode Systems AB
Severity: Major
Found in public/plupload/js/moxie.js - About 2 wks to fix

    Function swfobject has a Cognitive Complexity of 486 (exceeds 5 allowed). Consider refactoring.
    Open

    ;var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;
    if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;
    X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);
    ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");
    if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac};
    Severity: Minor
    Found in public/uploadify/js/jquery.uploadify-3.1.js - About 1 wk 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 swfobject has a Cognitive Complexity of 428 (exceeds 5 allowed). Consider refactoring.
    Open

    var swfobject = function() {
        
        var UNDEF = "undefined",
            OBJECT = "object",
            SHOCKWAVE_FLASH = "Shockwave Flash",
    Severity: Minor
    Found in public/uploadify/js/swfobject (2).js - About 1 wk 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 swfobject has a Cognitive Complexity of 428 (exceeds 5 allowed). Consider refactoring.
    Open

    var swfobject = function() {
        
        var UNDEF = "undefined",
            OBJECT = "object",
            SHOCKWAVE_FLASH = "Shockwave Flash",
    Severity: Minor
    Found in public/uploadify/js/swfobject.js - About 1 wk 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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        return {
            /* Public API
                - Reference: http://code.google.com/p/swfobject/wiki/documentation
            */ 
            registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
    Severity: Major
    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 1 wk to fix
    public/uploadify/js/swfobject.js on lines 632..786

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1277.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        return {
            /* Public API
                - Reference: http://code.google.com/p/swfobject/wiki/documentation
            */ 
            registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
    Severity: Major
    Found in public/uploadify/js/swfobject.js and 1 other location - About 1 wk to fix
    public/uploadify/js/swfobject (2).js on lines 622..776

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1277.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        var UNDEF = "undefined",
            OBJECT = "object",
            SHOCKWAVE_FLASH = "Shockwave Flash",
            SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
            FLASH_MIME_TYPE = "application/x-shockwave-flash",
    Severity: Major
    Found in public/uploadify/js/swfobject (2).js and 1 other location - About 6 days to fix
    public/uploadify/js/swfobject.js on lines 7..123

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1109.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        var UNDEF = "undefined",
            OBJECT = "object",
            SHOCKWAVE_FLASH = "Shockwave Flash",
            SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
            FLASH_MIME_TYPE = "application/x-shockwave-flash",
    Severity: Major
    Found in public/uploadify/js/swfobject.js and 1 other location - About 6 days to fix
    public/uploadify/js/swfobject (2).js on lines 7..123

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1109.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function Uploader has 788 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    plupload.Uploader = function(options) {
        /**
         * Fires when the current RunTime has been initialized.
         *
         * @event Init
    Severity: Major
    Found in public/plupload/js/plupload.dev.js - About 3 days to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          function matchVersions() {
              var rl = regObjArr.length;
              if (rl > 0) {
                  for (var i = 0; i < rl; i++) { // for each registered object element
                      var id = regObjArr[i].id;
      Severity: Major
      Found in public/uploadify/js/swfobject (2).js and 1 other location - About 3 days to fix
      public/uploadify/js/swfobject.js on lines 225..280

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 648.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          function matchVersions() {
              var rl = regObjArr.length;
              if (rl > 0) {
                  for (var i = 0; i < rl; i++) { // for each registered object element
                      var id = regObjArr[i].id;
      Severity: Major
      Found in public/uploadify/js/swfobject.js and 1 other location - About 3 days to fix
      public/uploadify/js/swfobject (2).js on lines 225..280

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 648.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
              isExpressInstallActive = true;
              storedCallbackFn = callbackFn || null;
              storedCallbackObj = {success:false, id:replaceElemIdStr};
              var obj = getElementById(replaceElemIdStr);
      Severity: Major
      Found in public/uploadify/js/swfobject (2).js and 1 other location - About 3 days to fix
      public/uploadify/js/swfobject.js on lines 312..357

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 579.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
              isExpressInstallActive = true;
              storedCallbackFn = callbackFn || null;
              storedCallbackObj = {success:false, id:replaceElemIdStr};
              var obj = getElementById(replaceElemIdStr);
      Severity: Major
      Found in public/uploadify/js/swfobject.js and 1 other location - About 3 days to fix
      public/uploadify/js/swfobject (2).js on lines 312..357

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 579.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function swfobject has 662 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var swfobject = function() {
          
          var UNDEF = "undefined",
              OBJECT = "object",
              SHOCKWAVE_FLASH = "Shockwave Flash",
      Severity: Major
      Found in public/uploadify/js/swfobject.js - About 3 days to fix

        Function swfobject has 659 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var swfobject = function() {
            
            var UNDEF = "undefined",
                OBJECT = "object",
                SHOCKWAVE_FLASH = "Shockwave Flash",
        Severity: Major
        Found in public/uploadify/js/swfobject (2).js - About 3 days to fix

          File plupload.dev.js has 1051 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Plupload - multi-runtime File Uploader
           * v2.1.2
           *
           * Copyright 2013, Moxiecode Systems AB
          Severity: Major
          Found in public/plupload/js/plupload.dev.js - About 2 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                function createCSS(sel, decl, media, newStyle) {
                    if (ua.ie && ua.mac) { return; }
                    var h = doc.getElementsByTagName("head")[0];
                    if (!h) { return; } // to also support badly authored HTML pages that lack a head element
                    var m = (media && typeof media == "string") ? media : "screen";
            Severity: Major
            Found in public/uploadify/js/swfobject (2).js and 1 other location - About 2 days to fix
            public/uploadify/js/swfobject.js on lines 552..583

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 375.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                function createCSS(sel, decl, media, newStyle) {
                    if (ua.ie && ua.mac) { return; }
                    var h = doc.getElementsByTagName("head")[0];
                    if (!h) { return; } // to also support badly authored HTML pages that lack a head element
                    var m = (media && typeof media == "string") ? media : "screen";
            Severity: Major
            Found in public/uploadify/js/swfobject.js and 1 other location - About 2 days to fix
            public/uploadify/js/swfobject (2).js on lines 542..573

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 375.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            File jquery.ui.plupload.js has 776 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * jquery.ui.plupload.js
             *
             * Copyright 2013, Moxiecode Systems AB
             * Released under GPL License.
            Severity: Major
            Found in public/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js - About 1 day to fix

              Function XMLHttpRequest has 363 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function XMLHttpRequest() {
                      var self = this,
                          // this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible
                          props = {
                              /**
              Severity: Major
              Found in public/plupload/js/moxie.js - About 1 day to fix
                Severity
                Category
                Status
                Source
                Language