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

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

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

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

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 _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

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', {

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

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

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

},{"268":268,"30":30}],4:[function(_dereq_,module,exports){
_dereq_(269);
module.exports = _dereq_(30).Object.entries;

},{"269":269,"30":30}],5:[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 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
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

},{"208":208,"272":272,"30":30}],8:[function(_dereq_,module,exports){
_dereq_(273);
module.exports = _dereq_(30).String.padEnd;

},{"273":273,"30":30}],9:[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 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

},{"130":130,"131":131,"132":132,"133":133,"134":134,"135":135,"136":136,"137":137,"138":138,"139":139,"140":140,"141":141,"142":142,"143":143,"144":144,"145":145,"146":146,"147":147,"148":148,"149":149,"150":150,"151":151,"152":152,"153":153,"154":154,"155":155,"156":156,"157":157,"158":158,"159":159,"160":160,"161":161,"162":162,"163":163,"164":164,"165":165,"166":166,"167":167,"168":168,"169":169,"170":170,"171":171,"172":172,"173":173,"174":174,"175":175,"176":176,"177":177,"178":178,"179":179,"180":180,"181":181,"182":182,"183":183,"184":184,"185":185,"186":186,"187":187,"188":188,"189":189,"190":190,"191":191,"192":192,"193":193,"194":194,"195":195,"196":196,"197":197,"198":198,"199":199,"200":200,"201":201,"202":202,"203":203,"204":204,"205":205,"206":206,"207":207,"208":208,"209":209,"210":210,"211":211,"212":212,"213":213,"214":214,"215":215,"216":216,"217":217,"218":218,"219":219,"220":220,"221":221,"222":222,"223":223,"224":224,"225":225,"226":226,"227":227,"228":228,"229":229,"230":230,"231":231,"232":232,"233":233,"234":234,"235":235,"236":236,"237":237,"238":238,"239":239,"240":240,"241":241,"242":242,"243":243,"244":244,"245":245,"246":246,"247":247,"248":248,"249":249,"250":250,"251":251,"252":252,"253":253,"254":254,"255":255,"256":256,"257":257,"258":258,"259":259,"260":260,"261":261,"262":262,"263":263,"264":264,"265":265,"266":266,"267":267,"30":30}],3:[function(_dereq_,module,exports){
_dereq_(268);
module.exports = _dereq_(30).Array.includes;

},{"268":268,"30":30}],4:[function(_dereq_,module,exports){
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
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

},{"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

Severity
Category
Status
Source
Language