CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-includes/js/media-views.js

Summary

Maintainability
F
1 mo
Test Coverage

File media-views.js has 4099 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global _wpMediaViewsL10n, confirm, getUserSetting, setUserSetting */
(function($, _){
    var media = wp.media, l10n;

    // Link any localized strings.
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 wk to fix

    Function createStates has 95 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            createStates: function() {
                var options = this.options;
    
                // Add the default states.
                this.states.add([
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 3 hrs to fix

      Function bindHandlers has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              bindHandlers: function() {
                  var handlers, checkCounts;
      
                  media.view.MediaFrame.Select.prototype.bindHandlers.apply( this, arguments );
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

        Function createCropToolbar has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                createCropToolbar: function() {
                    var canSkipCrop, toolbarOptions;
        
                    canSkipCrop = this.get('canSkipCrop') || false;
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

          Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  render: function() {
                      var options = _.defaults( this.model.toJSON(), {
                              orientation:   'landscape',
                              uploading:     false,
                              type:          '',
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

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

                    createToolbar: function() {
                        var filters, FiltersConstructor;
            
                        /**
                         * @member {wp.media.view.Toolbar}
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

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

                      toggleSelection: function( options ) {
                          var collection = this.collection,
                              selection = this.options.selection,
                              model = this.model,
                              method = options && options.method,
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

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

                        renderReplaceImageToolbar: function() {
                            var frame = this,
                                lastState = frame.lastState(),
                                previous = lastState && lastState.id;
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

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

                          createFilters: function() {
                              var filters = {};
                  
                              _.each( media.view.settings.mimeTypes || {}, function( text, key ) {
                                  filters[ key ] = {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                    Function initSortable has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            initSortable: function() {
                                var collection = this.collection;
                    
                                if ( ! this.options.sortable || ! $.fn.sortable ) {
                                    return;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                      Function initialize has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              initialize: function() {
                                  this.el.id = _.uniqueId('__attachments-view-');
                      
                                  _.defaults( this.options, {
                                      refreshSensitivity: 200,
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                        Function initialize has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                initialize: function() {
                        
                                    media.view.Frame.prototype.initialize.apply( this, arguments );
                        
                                    _.defaults( this.options, {
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                          Function renderSettings has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  renderSettings: function( browser ) {
                                      var library = this.get('library'),
                                          collectionType = this.get('collectionType'),
                                          dragInfoText = this.get('dragInfoText'),
                                          SettingsView = this.get('SettingsView'),
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                            Function set has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    set: function( id, view, options ) {
                                        var priority, views, index;
                            
                                        options = options || {};
                            
                            
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                              Function createFilters has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      createFilters: function() {
                                          var type = this.model.get('type'),
                                              types = media.view.settings.mimeTypes,
                                              text;
                              
                              
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

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

                                        galleryEditToolbar: function() {
                                            var editing = this.state().get('editing');
                                            this.toolbar.set( new media.view.Toolbar({
                                                controller: this,
                                                items: {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2618..2646

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

                                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

                                        playlistEditToolbar: function() {
                                            var editing = this.state().get('editing');
                                            this.toolbar.set( new media.view.Toolbar({
                                                controller: this,
                                                items: {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2561..2589

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

                                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

                                        mainVideoPlaylistToolbar: function( view ) {
                                            var controller = this;
                                
                                            this.selectionStatusToolbar( view );
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2496..2520

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

                                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

                                        mainPlaylistToolbar: function( view ) {
                                            var controller = this;
                                
                                            this.selectionStatusToolbar( view );
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2522..2546

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

                                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

                                        galleryAddToolbar: function() {
                                            this.toolbar.set( new media.view.Toolbar({
                                                controller: this,
                                                items: {
                                                    insert: {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 7 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2648..2673

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

                                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

                                        playlistAddToolbar: function() {
                                            this.toolbar.set( new media.view.Toolbar({
                                                controller: this,
                                                items: {
                                                    insert: {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 7 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2591..2616

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

                                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

                                        videoPlaylistMenu: function( view ) {
                                            var lastState = this.lastState(),
                                                previous = lastState && lastState.id,
                                                frame = this;
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2319..2341
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2822..2845

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

                                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

                                        renderMenu: function( view ) {
                                            var lastState = this.lastState(),
                                                previous = lastState && lastState.id,
                                                frame = this;
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2319..2341
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2343..2365

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

                                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

                                        playlistMenu: function( view ) {
                                            var lastState = this.lastState(),
                                                previous = lastState && lastState.id,
                                                frame = this;
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 5 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2343..2365
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2822..2845

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

                                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

                                            library.comparator = function( a, b ) {
                                                var aInQuery = !! this.mirroring.get( a.cid ),
                                                    bInQuery = !! this.mirroring.get( b.cid );
                                
                                                if ( ! aInQuery && bInQuery ) {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 4 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1125..1136

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

                                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

                                            library.comparator = function( a, b ) {
                                                var aInQuery = !! this.mirroring.get( a.cid ),
                                                    bInQuery = !! this.mirroring.get( b.cid );
                                
                                                if ( ! aInQuery && bInQuery ) {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 4 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1207..1218

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

                                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

                                            library.validator = function( attachment ) {
                                                return !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && media.model.Selection.prototype.validator.apply( this, arguments );
                                            };
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 907..909

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

                                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

                                            library.validator = function( attachment ) {
                                                return !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && media.model.Selection.prototype.validator.apply( this, arguments );
                                            };
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1076..1078

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

                                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

                                        deactivate: function() {
                                            // Stop watching for uploaded attachments.
                                            this.get('library').unobserve( wp.Uploader.queue );
                                
                                            this.frame.off( 'content:render:browse', this.renderSettings, this );
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 831..838

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

                                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

                                        deactivate: function() {
                                            // Stop watching for uploaded attachments.
                                            this.get('library').unobserve( wp.Uploader.queue );
                                
                                            this.frame.off( 'content:render:browse', this.gallerySettings, this );
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 983..990

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

                                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

                                                new media.controller.Library({
                                                    id:         'gallery',
                                                    title:      l10n.createGalleryTitle,
                                                    priority:   40,
                                                    toolbar:    'main-gallery',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2123..2135
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2156..2168

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

                                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

                                                new media.controller.Library({
                                                    id:         'playlist',
                                                    title:      l10n.createPlaylistTitle,
                                                    priority:   60,
                                                    toolbar:    'main-playlist',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2095..2107
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2156..2168

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

                                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

                                                new media.controller.Library({
                                                    id:         'video-playlist',
                                                    title:      l10n.createVideoPlaylistTitle,
                                                    priority:   60,
                                                    toolbar:    'main-video-playlist',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2095..2107
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2123..2135

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

                                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

                                                new media.controller.CollectionEdit({
                                                    type: 'audio',
                                                    collectionType: 'playlist',
                                                    title:          l10n.editPlaylistTitle,
                                                    SettingsView:   media.view.Settings.Playlist,
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2170..2180

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

                                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

                                                new media.controller.CollectionEdit({
                                                    type: 'video',
                                                    collectionType: 'playlist',
                                                    title:          l10n.editVideoPlaylistTitle,
                                                    SettingsView:   media.view.Settings.Playlist,
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2138..2148

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

                                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

                                        toggleLinkSettings: function() {
                                            if ( this.model.get( 'link' ) === 'none' ) {
                                                this.$( '.link-settings' ).addClass('hidden');
                                            } else {
                                                this.$( '.link-settings' ).removeClass('hidden');
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 6305..6311

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

                                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

                                        toggleCustomSize: function() {
                                            if ( this.model.get( 'size' ) !== 'custom' ) {
                                                this.$( '.custom-size' ).addClass('hidden');
                                            } else {
                                                this.$( '.custom-size' ).removeClass('hidden');
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 2 hrs to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 6297..6303

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

                                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

                                        deselect: function( model, collection ) {
                                            var selection = this.options.selection;
                                
                                            // Check if a selection exists and if it's the collection provided.
                                            // If they're not the same collection, bail; we're in another
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4584..4595

                                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

                                        select: function( model, collection ) {
                                            var selection = this.options.selection;
                                
                                            // Check if a selection exists and if it's the collection provided.
                                            // If they're not the same collection, bail; we're in another
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4600..4610

                                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

                                        defaults: _.defaults({
                                            id:         'replace-image',
                                            filterable: 'uploaded',
                                            multiple:   false,
                                            toolbar:    'replace',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1100..1108

                                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

                                        defaults: _.defaults({
                                            id:         'featured-image',
                                            filterable: 'uploaded',
                                            multiple:   false,
                                            toolbar:    'featured-image',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1181..1189

                                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

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

                                            browser.toolbar.set( 'reverse', {
                                                text:     l10n.reverseOrder,
                                                priority: 80,
                                
                                                click: function() {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1020..1027

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

                                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

                                            browser.toolbar.set( 'reverse', {
                                                text:     l10n.reverseOrder,
                                                priority: 80,
                                
                                                click: function() {
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 856..863

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

                                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

                                    media.view.Settings.Playlist = media.view.Settings.extend({
                                        className: 'collection-settings playlist-settings',
                                        template:  media.template('playlist-settings')
                                    });
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 5835..5838

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

                                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

                                    media.view.Settings.Gallery = media.view.Settings.extend({
                                        className: 'collection-settings gallery-settings',
                                        template:  media.template('gallery-settings')
                                    });
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 5849..5852

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

                                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

                                        hide: function( id ) {
                                            var view = this.get( id );
                                
                                            if ( ! view ) {
                                                return;
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 50 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4286..4294

                                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

                                    media.view.Attachment.EditLibrary = media.view.Attachment.extend({
                                        buttons: {
                                            close: true
                                        }
                                    });
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 50 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4809..4813

                                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

                                        show: function( id ) {
                                            var view = this.get( id );
                                
                                            if ( ! view ) {
                                                return;
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 50 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4276..4284

                                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

                                    media.view.Attachment.Library = media.view.Attachment.extend({
                                        buttons: {
                                            check: true
                                        }
                                    });
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 50 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4824..4828

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

                                        defaults: {
                                            id:      'image',
                                            url:     '',
                                            menu:    'image-details',
                                            content: 'image-details',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 3 other locations - About 45 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 528..537
                                Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 595..604
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1329..1339

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

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

                                        defaults: {
                                            id:      'embed',
                                            url:     '',
                                            menu:    'default',
                                            content: 'embed',
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 3 other locations - About 45 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 528..537
                                Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 595..604
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2743..2752

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

                                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

                                        unset: function() {
                                            /**
                                             * call 'unset' directly on the parent class
                                             */
                                            media.view.PriorityList.prototype.unset.apply( this, arguments );
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 45 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4224..4230
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4232..4238

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

                                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

                                        ready: function() {
                                            /**
                                             * call 'ready' directly on the parent class
                                             */
                                            media.view.PriorityList.prototype.ready.apply( this, arguments );
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 45 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4232..4238
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4240..4246

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

                                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

                                        set: function() {
                                            /**
                                             * call 'set' directly on the parent class
                                             */
                                            media.view.PriorityList.prototype.set.apply( this, arguments );
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 45 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4224..4230
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4240..4246

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

                                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

                                        events: {
                                            'click .attachment-preview':      'toggleSelectionHandler',
                                            'change [data-setting]':          'updateSetting',
                                            'change [data-setting] input':    'updateSetting',
                                            'change [data-setting] select':   'updateSetting',
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 35 mins to fix
                                Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js on lines 148..157
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 5868..5877

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

                                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

                                        events: {
                                            'change [data-setting]':          'updateSetting',
                                            'change [data-setting] input':    'updateSetting',
                                            'change [data-setting] select':   'updateSetting',
                                            'change [data-setting] textarea': 'updateSetting',
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 2 other locations - About 35 mins to fix
                                Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js on lines 148..157
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 4374..4383

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

                                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 ( ! this.get('library') ) {
                                                this.set( 'library', media.query({ type: 'image' }) );
                                            }
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 30 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1114..1116

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

                                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 ( ! this.get('library') ) {
                                                this.set( 'library', media.query({ type: 'image' }) );
                                            }
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 30 mins to fix
                                Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1196..1198

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

                                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