jkuchar/MultipleFileUpload

View on GitHub
public/plupload/js/plupload.dev.js

Summary

Maintainability
F
1 wk
Test Coverage

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

    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

      Function onUploadFile has 146 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function onUploadFile(up, file) {
              var url = up.settings.url
              , chunkSize = up.settings.chunk_size
              , retries = up.settings.max_retries
              , features = up.features
      Severity: Major
      Found in public/plupload/js/plupload.dev.js - About 5 hrs to fix

        Function setOption has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function setOption(option, value, init) {
                var self = this, reinitRequired = false;
        
                function _setOption(option, value, init) {
                    var oldValue = settings[option];
        Severity: Major
        Found in public/plupload/js/plupload.dev.js - About 4 hrs to fix

          Function uploadNextChunk has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function uploadNextChunk() {
                      var chunkBlob, formData, args = {}, curChunkSize;
          
                      // make sure that file wasn't cancelled and upload is not stopped in general
                      if (file.status !== plupload.UPLOADING || up.state === plupload.STOPPED) {
          Severity: Major
          Found in public/plupload/js/plupload.dev.js - About 4 hrs to fix

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

                function initControls(settings, cb) {
                    var self = this, inited = 0, queue = [];
            
                    // common settings
                    var options = {
            Severity: Major
            Found in public/plupload/js/plupload.dev.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 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 normalizeCaps has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function normalizeCaps(settings) {        
                      var features = settings.required_features, caps = {};
                  
                      function resolve(feature, value, strict) {
                          // Feature notation is deprecated, use caps (this thing here is required for backward compatibility)
                  Severity: Minor
                  Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

                    Function resolveFile has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                function resolveFile(file) {
                                    var type = o.typeOf(file);
                    
                                    // o.File
                                    if (file instanceof o.File) { 
                    Severity: Minor
                    Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

                      Function onload has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  xhr.onload = function() {
                                      // check if upload made itself through
                                      if (xhr.status >= 400) {
                                          handleError();
                                          return;
                      Severity: Minor
                      Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

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

                                init : function() {
                                    var self = this;
                        
                                    if (typeof(settings.preinit) == "function") {
                                        settings.preinit(self);
                        Severity: Minor
                        Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

                          Function File has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          plupload.File = (function() {
                              var filepool = {};
                          
                              function PluploadFile(file) {
                          
                          
                          Severity: Minor
                          Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

                            Function PluploadFile has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function PluploadFile(file) {
                            
                                    plupload.extend(this, {
                            
                                        /**
                            Severity: Minor
                            Found in public/plupload/js/plupload.dev.js - About 1 hr to fix

                              Avoid too many return statements within this function.
                              Open

                                      return size + " " + plupload.translate('b');
                              Severity: Major
                              Found in public/plupload/js/plupload.dev.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return Math.round(size / 1024) + " " + plupload.translate('kb');
                                Severity: Major
                                Found in public/plupload/js/plupload.dev.js - About 30 mins to fix

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

                                                  if (inited) {
                                                      self.runtime = o.Runtime.getInfo(getRUID()).type;
                                                      self.trigger('Init', { runtime: self.runtime });
                                                      self.trigger('PostInit');
                                                  } else {
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 3 hrs to fix
                                  public/plupload/js/plupload.dev.js on lines 1304..1313

                                  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 109.

                                  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

                                                  if (inited) {
                                                      self.runtime = o.Runtime.getInfo(getRUID()).type;
                                                      self.trigger('Init', { runtime: self.runtime });
                                                      self.trigger('PostInit');
                                                  } else {
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 3 hrs to fix
                                  public/plupload/js/plupload.dev.js on lines 1758..1767

                                  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 109.

                                  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

                                                              if (settings.browse_button_hover) {
                                                                  if ('mouseenter' === e.type) {
                                                                      o.addClass(el, settings.browse_button_hover);
                                                                  } else if ('mouseleave' === e.type) {
                                                                      o.removeClass(el, settings.browse_button_hover);
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1078..1084

                                  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 74.

                                  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

                                                              if (settings.browse_button_active) {
                                                                  if ('mousedown' === e.type) {
                                                                      o.addClass(el, settings.browse_button_active);
                                                                  } else if ('mouseup' === e.type) {
                                                                      o.removeClass(el, settings.browse_button_active);
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1070..1076

                                  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 74.

                                  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

                                                  xhr.send(chunkBlob, {
                                                      runtime_order: up.settings.runtimes,
                                                      required_caps: up.settings.required_features,
                                                      preferred_caps: preferred_caps,
                                                      swf_url: up.settings.flash_swf_url,
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1491..1497

                                  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 70.

                                  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

                                                  xhr.send(formData, {
                                                      runtime_order: up.settings.runtimes,
                                                      required_caps: up.settings.required_features,
                                                      preferred_caps: preferred_caps,
                                                      swf_url: up.settings.flash_swf_url,
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1511..1517

                                  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 70.

                                  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

                                                  if (typeof(settings.init) == "function") {
                                                      settings.init(self);
                                                  } else {
                                                      plupload.each(settings.init, function(func, name) {
                                                          self.bind(name, func);
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1730..1736

                                  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 67.

                                  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

                                              if (typeof(settings.preinit) == "function") {
                                                  settings.preinit(self);
                                              } else {
                                                  plupload.each(settings.preinit, function(func, name) {
                                                      self.bind(name, func);
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 1 hr to fix
                                  public/plupload/js/plupload.dev.js on lines 1750..1756

                                  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 67.

                                  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

                                      if (filters.length && !filters.regexp.test(file.name)) {
                                          this.trigger('Error', {
                                              code : plupload.FILE_EXTENSION_ERROR,
                                              message : plupload.translate('File extension error.'),
                                              file : file
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 50 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 672..681

                                  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 51.

                                  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

                                      if (file.size !== undef && maxSize && file.size > maxSize) {
                                          this.trigger('Error', {
                                              code : plupload.FILE_SIZE_ERROR,
                                              message : plupload.translate('File size error.'),
                                              file : file
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 50 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 653..662

                                  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 51.

                                  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 3 locations. Consider refactoring.
                                  Open

                                          file.percent = file.size > 0 ? Math.ceil(file.loaded / file.size * 100) : 100;
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 2 other locations - About 40 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 964..964
                                  public/plupload/js/plupload.dev.js on lines 967..967

                                  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 49.

                                  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 3 locations. Consider refactoring.
                                  Open

                                              total.percent = files.length > 0 ? Math.ceil(total.uploaded / files.length * 100) : 0;
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 2 other locations - About 40 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 927..927
                                  public/plupload/js/plupload.dev.js on lines 967..967

                                  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 49.

                                  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 3 locations. Consider refactoring.
                                  Open

                                              total.percent = total.size > 0 ? Math.ceil(total.loaded / total.size * 100) : 0;
                                  Severity: Major
                                  Found in public/plupload/js/plupload.dev.js and 2 other locations - About 40 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 927..927
                                  public/plupload/js/plupload.dev.js on lines 964..964

                                  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 49.

                                  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

                                          if (size > (boundary/=1024)) {
                                              return round(size / boundary, 1) + " " + plupload.translate('mb');
                                          }
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 35 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 586..588

                                  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 47.

                                  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

                                          if (fileDrops.length) {
                                              plupload.each(fileDrops, function(fileDrop) {
                                                  fileDrop.destroy();
                                              });
                                              fileDrops = [];
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 35 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 1606..1611

                                  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 47.

                                  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

                                          if (fileInputs.length) {
                                              plupload.each(fileInputs, function(fileInput) {
                                                  fileInput.destroy();
                                              });
                                              fileInputs = [];
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 35 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 1613..1618

                                  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 47.

                                  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

                                          if (size > (boundary/=1024)) {
                                              return round(size / boundary, 1) + " " + plupload.translate('gb');
                                          }
                                  Severity: Minor
                                  Found in public/plupload/js/plupload.dev.js and 1 other location - About 35 mins to fix
                                  public/plupload/js/plupload.dev.js on lines 591..593

                                  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 47.

                                  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

                                  There are no issues that match your filters.

                                  Category
                                  Status