lightspeeddevelopment/lsx-team

View on GitHub

Showing 960 of 960 total issues

Function output has a Cognitive Complexity of 86 (exceeds 25 allowed). Consider refactoring.
Open

    public function output( $atts ) {
        extract( shortcode_atts(array(
            'columns' => 4,
            'orderby' => 'name',
            'order' => 'ASC',
Severity: Minor
Found in classes/class-lsx-team.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

<?php
/**
 * The template for displaying all single team members.
 *
 * @package lsx-team
Severity: Major
Found in templates/archive-team.php and 1 other location - About 4 hrs to fix
templates/taxonomy-team_role.php on lines 1..57

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

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

<?php
/**
 * The template for displaying all single team members.
 *
 * @package lsx-team
Severity: Major
Found in templates/taxonomy-team_role.php and 1 other location - About 4 hrs to fix
templates/archive-team.php on lines 1..57

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

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 lsx_team_scporder_pre_get_posts has a Cognitive Complexity of 44 (exceeds 25 allowed). Consider refactoring.
Open

    public function lsx_team_scporder_pre_get_posts( $wp_query ) {
        $objects = $this->get_lsx_team_scporder_options_objects();

        if ( empty( $objects ) || ! isset( $wp_query->query['post_type'] ) )
            return false;
Severity: Minor
Found in includes/class-lsx-team-scpo-engine.php - About 3 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Adjoining classes: #lsx-team-slider .slick-arrow.slick-prev:before
Open

#lsx-team-slider .slick-arrow.slick-prev:before { content: '\f104'; left: 1.1rem; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: #lsx-team-slider .slick-arrow.slick-next:before
Open

#lsx-team-slider .slick-arrow.slick-next:before { content: '\f105'; left: 1.5rem; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Don't use IDs in selectors.
Open

#lsx-team-slider .slick-arrow.slick-next:before { content: '\f105'; left: 1.5rem; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .gutenberg-compatible-template.using-gutenberg .lsx-team-block
Open

.gutenberg-compatible-template.using-gutenberg .lsx-team-block, .gutenberg-compatible-template.using-gutenberg #lsx-team-slider.lsx-team-block { margin-left: auto; margin-right: auto; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Don't use IDs in selectors.
Open

.gutenberg-compatible-template.using-gutenberg .lsx-team-block.full, .gutenberg-compatible-template.using-gutenberg #lsx-team-slider.lsx-team-block.full { max-width: 100%; width: calc(100% + 30px); }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .gutenberg-compatible-template.using-gutenberg .lsx-team-block .slick-dots
Open

.gutenberg-compatible-template.using-gutenberg .lsx-team-block .slick-dots, .gutenberg-compatible-template.using-gutenberg #lsx-team-slider.lsx-team-block .slick-dots { margin-left: auto; margin-right: auto; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

The property -moz-box-orient is compatible with -webkit-box-orient and should be included as well.
Open

.archive.post-type-archive-team .lsx-team-container .row-flex { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

@media (min-width: 768px) { .single.single-team .entry-tabs .nav-tabs { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-flow: row nowrap; flex-flow: row nowrap; padding-left: 10px; padding-right: 10px; } }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .lsx-team-avatar
Open

.single.single-team .lsx-team-avatar { border-radius: 50%; display: block; height: 32rem; margin: 0 auto 10px; overflow: hidden; width: 32rem; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .lsx-team-avatar > img.lazyload
Open

.single.single-team .lsx-team-avatar > img.lazyload, .single.single-team .lsx-team-avatar > img.lazyloading { width: auto; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

The property -moz-box-pack is compatible with -webkit-box-pack and should be included as well.
Open

.archive.post-type-archive-team .lsx-team-container .row-flex { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

The property -ms-box-pack is compatible with -webkit-box-pack and should be included as well.
Open

@media (min-width: 768px) { .single.single-team .entry-tabs .nav-tabs > li > a { -webkit-box-align: center; -ms-flex-align: center; align-items: center; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .entry-tabs .nav-tabs > li > a
Open

@media (min-width: 992px) { .single.single-team .entry-tabs .nav-tabs > li > a { font-size: 22px; } }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .entry-tabs .lsx-blog-customizer-posts-wrapper .post-slot.slick-slide
Open

.single.single-team .entry-tabs .lsx-blog-customizer-posts-wrapper .post-slot.slick-slide { margin-left: 10px; margin-right: 10px; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .lsx-team-avatar > img.lazyloading
Open

.single.single-team .lsx-team-avatar > img.lazyload, .single.single-team .lsx-team-avatar > img.lazyloading { width: auto; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint

Adjoining classes: .single.single-team .lsx-team-socials-header:after
Open

.single.single-team .lsx-team-socials-header:after { border-bottom: 1px solid; bottom: 0; content: ''; height: 0; left: 50%; position: absolute; -webkit-transform: translateX(-50%); transform: translateX(-50%); width: 80px; }
Severity: Minor
Found in assets/css/lsx-team.css by csslint
Severity
Category
Status
Source
Language