aristath/kirki

View on GitHub

Showing 644 of 644 total issues

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

        isContextuallyActive: function() {
            var section = this,
                children,
                activeCount = 0;
            if ( 'kirki-nested' !== this.params.type ) {
Severity: Minor
Found in packages/kirki-framework/module-sections/src/script.js - About 1 hr to fix

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

},{"11":11}],73:[function(_dereq_,module,exports){
'use strict';
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = _dereq_(83);
var gOPS = _dereq_(80);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

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

},{"40":40,"98":98}],222:[function(_dereq_,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = _dereq_(75);
var gOPD = _dereq_(77);
var getPrototypeOf = _dereq_(81);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

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

        initialize: function (id, options) {
            var control = this,
                args = options || {};

            args.params = args.params || {};
Severity: Minor
Found in packages/kirki-framework/control-base/src/dynamic-control.js - About 1 hr to fix

Method content_template has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function content_template() {
        ?>
        <label class='kirki-sortable'>
            <span class="customize-control-title">
                {{{ data.label }}}
Severity: Minor
Found in packages/kirki-framework/control-sortable/src/Control/Sortable.php - About 1 hr to fix

Method set_hsl has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected function set_hsl() {
            $red   = $this->red / 255;
            $green = $this->green / 255;
            $blue  = $this->blue / 255;

Severity: Minor
Found in lib/class-aricolor.php - About 1 hr to fix

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

    this.fontRulerA_.setFont(new Font(this.font_.getName() + ',' + FontWatchRunner.LastResortFonts.SERIF, this.font_.getVariation()));
packages/kirki-framework/module-webfonts/src/assets/scripts/vendor-typekit/src/core/fontwatchrunner.js on lines 99..99

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

    this.fontRulerB_.setFont(new Font(this.font_.getName() + ',' + FontWatchRunner.LastResortFonts.SANS_SERIF, this.font_.getVariation()));
packages/kirki-framework/module-webfonts/src/assets/scripts/vendor-typekit/src/core/fontwatchrunner.js on lines 98..98

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

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

    init: function() {
        var self = this;

        _.each( window.kirkiControlDependencies, function( requires, controlID ) {
            var control = wp.customize.control( controlID );
Severity: Minor
Found in packages/kirki-framework/module-field-dependencies/src/script.js - About 1 hr to fix

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

},{"94":94}],94:[function(_dereq_,module,exports){
var global = _dereq_(46);
var hide = _dereq_(48);
var has = _dereq_(47);
var SRC = _dereq_(123)('src');
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

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

  DomHelper.prototype.loadScript = function(src, opt_callback, opt_timeout) {
    var head = this.document_.getElementsByTagName('head')[0];

    if (head) {
      var script = this.createElement('script', {

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

        _setUpSettingPropertyLinks: function () {
            var control = this,
                nodes;

            if (!control.setting) {
Severity: Minor
Found in packages/kirki-framework/control-base/src/dynamic-control.js - About 1 hr to fix

Method css_dimension has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function css_dimension( $value ) {

        // Trim it.
        $value = trim( $value );

Severity: Minor
Found in packages/kirki-framework/compatibility/src/Sanitize_Values.php - About 1 hr to fix

Method set_js_vars has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function set_js_vars() {
        if ( ! is_array( $this->js_vars ) ) {
            $this->js_vars = [];
        }

Severity: Minor
Found in packages/kirki-framework/compatibility/src/Field.php - About 1 hr to fix

Method styles_parse has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function styles_parse( $css = [] ) {

        // Pass our styles from the kirki_styles_array filter.
        $css = apply_filters( 'kirki_styles_array', $css );

Severity: Minor
Found in packages/kirki-framework/module-css/src/CSS/Generator.php - About 1 hr to fix

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

},{"273":273,"30":30}],9:[function(_dereq_,module,exports){
_dereq_(274);
module.exports = _dereq_(30).String.padStart;

},{"274":274,"30":30}],10:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 174..178
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 178..182
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 182..186
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 186..190
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 196..200

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

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

},{"10":10,"2":2,"279":279,"280":280,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9}],2:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 4936..4936
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 5875..5875

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

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

},{"269":269,"30":30}],5:[function(_dereq_,module,exports){
_dereq_(270);
module.exports = _dereq_(30).Object.getOwnPropertyDescriptors;

},{"270":270,"30":30}],6:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 174..178
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 178..182
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 186..190
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 196..200
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 200..204

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

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

},{"270":270,"30":30}],6:[function(_dereq_,module,exports){
_dereq_(271);
module.exports = _dereq_(30).Object.values;

},{"271":271,"30":30}],7:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 174..178
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 178..182
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 182..186
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 196..200
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 200..204

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

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

},{"128":128,"36":36,"42":42,"44":44,"46":46,"51":51,"58":58,"75":75,"79":79,"94":94,"99":99}],224:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 33..33
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 5875..5875

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

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

Severity
Category
Status
Source
Language