insideout10/wordlift-plugin-js

View on GitHub
app/admin_files/wp-tinymce-schema.js

Summary

Maintainability
F
3 wks
Test Coverage

Function Schema has 295 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    tinymce.html.Schema = function(settings) {
        var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
        var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};

        // Creates an lookup table map object for the specified option or the default value
Severity: Major
Found in app/admin_files/wp-tinymce-schema.js - About 1 day to fix

    File wp-tinymce-schema.js has 603 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * TinyMCE Schema.js
     *
     * Duck-punched by WordPress core to support a sane schema superset.
     *
    Severity: Major
    Found in app/admin_files/wp-tinymce-schema.js - About 1 day to fix

      Function getHTML4 has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function getHTML4() {
              var html4 = mapCache.html4;
      
              if (!html4) {
                  // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size
      Severity: Major
      Found in app/admin_files/wp-tinymce-schema.js - About 4 hrs to fix

        Function getHTML5 has 121 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function getHTML5() {
                var html5 = mapCache.html5;
        
                if (!html5) {
                    html5 = mapCache.html5 = unpack({
        Severity: Major
        Found in app/admin_files/wp-tinymce-schema.js - About 4 hrs to fix

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

                  function addValidElements(valid_elements) {
                      var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                          prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                          elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                          attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
          Severity: Major
          Found in app/admin_files/wp-tinymce-schema.js - About 3 hrs to fix

            Function getSaneSchema has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function getSaneSchema() {
                    var cachedMapCache = mapCache,
                        html5, html4;
            
                    if ( mapCache.sane )
            Severity: Minor
            Found in app/admin_files/wp-tinymce-schema.js - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                                          for (ai = 0, al = attrData.length; ai < al; ai++) {
                                              matches = attrRuleRegExp.exec(attrData[ai]);
                                              if (matches) {
                                                  attr = {};
                                                  attrType = matches[1];
              Severity: Major
              Found in app/admin_files/wp-tinymce-schema.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            for (key in globalAttributes)
                                                attributes[key] = globalAttributes[key];
                Severity: Major
                Found in app/admin_files/wp-tinymce-schema.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (attrPatterns[i].pattern.test(name)) {
                                                  return true;
                                              }
                  Severity: Major
                  Found in app/admin_files/wp-tinymce-schema.js - About 45 mins to fix

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

                            function addValidElements(valid_elements) {
                                var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                                    prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                                    elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                                    attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 6 days to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2774..2911

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        function getHTML4() {
                            var html4 = mapCache.html4;
                    
                            if (!html4) {
                                // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 3 days to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2585..2711

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

                    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

                                    }, 'html[A|manifest][body|head]' +
                                        'head[A][base|command|link|meta|noscript|script|style|title]' +
                                        'title[A][#]' +
                                        'base[A|href|target][]' +
                                        'link[A|href|rel|media|type|sizes|crossorigin|hreflang][]' +
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 2 days to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2472..2578

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            if (!settings.valid_elements) {
                                // No valid elements defined then clone the elements from the schema spec
                                each(schemaItems, function(element, name) {
                                    elements[name] = {
                                        attributes : element.attributes,
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 day to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 3005..3039

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            function addCustomElements(custom_elements) {
                                var customElementRegExp = /^(~)?(.+)$/;
                    
                                if (custom_elements) {
                                    each(split(custom_elements), function(rule) {
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 day to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2925..2956

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            function addValidChildren(valid_children) {
                                var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
                    
                                if (valid_children) {
                                    each(split(valid_children), function(rule) {
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 day to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2959..2986

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        function unpack(lookup, data) {
                            var key, elements = {};
                    
                            function replace(value) {
                                return value.replace(/[A-Z]+/g, function(key) {
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 day to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2432..2459

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

                    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

                            self.isValid = function(name, attr) {
                                var attrPatterns, i, rule = getElementRule(name);
                    
                                // Check if it's a valid element
                                if (rule) {
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 5 hrs to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 3098..3126

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            function createLookupTable(option, default_value, extend) {
                                var value = settings[option];
                    
                                if (!value) {
                                    // Get cached default map or make it if needed
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 5 hrs to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2718..2737

                    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

                            function getElementRule(name) {
                                var element = elements[name], i;
                    
                                // Exact match found
                                if (element)
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 2 hrs to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2988..3003

                    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

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

                            if (settings.valid_styles) {
                                validStyles = {};
                    
                                // Convert styles into a rule list
                                each(settings.valid_styles, function(value, key) {
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 hr to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2747..2754

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

                    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 (settings.invalid_elements) {
                                tinymce.each(tinymce.explode(settings.invalid_elements), function(item) {
                                    if (elements[item])
                                        delete elements[item];
                                });
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 hr to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 3049..3054

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            function setValidElements(valid_elements) {
                                elements = {};
                                patternElements = [];
                    
                                addValidElements(valid_elements);
                    Severity: Major
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 1 hr to fix
                    app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2913..2922

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

                    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

                                each( html4settings.attributes, function( attribute, key ) {
                                    if ( ! html5settings.attributes[ key ] )
                                        html5settings.attributes[ key ] = attribute;
                                });
                    Severity: Minor
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 35 mins to fix
                    app/admin_files/wp-tinymce-schema.js on lines 357..360

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 47.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                each( html4settings.children, function( child, key ) {
                                    if ( ! html5settings.children[ key ] )
                                        html5settings.children[ key ] = child;
                                });
                    Severity: Minor
                    Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 35 mins to fix
                    app/admin_files/wp-tinymce-schema.js on lines 343..346

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 47.

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

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

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

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

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status