Showing 11 of 17 total issues
Function exports
has 345 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
hub: {
- Create a ticketCreate a ticket
Method cover_customize_register
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cover_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->add_setting(
- Create a ticketCreate a ticket
File gruntfile.js
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Cover Gruntfile
* http://eichefam.net/projects/cover
* @author Paul Eiche
*/
- Create a ticketCreate a ticket
Method cover_posted_on
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cover_posted_on() {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
- Create a ticketCreate a ticket
Method cover_customize_options
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cover_customize_options() {
$header_color = esc_attr( get_theme_mod( 'cover_header_color', '#026ed2' ) );
$link_color = esc_attr( get_theme_mod( 'cover_link_color', '#026ed2' ) );
$overlay_color = esc_attr( get_theme_mod( 'cover_overlay_color', 'overlay-dark' ) );
$list_style = esc_attr( get_theme_mod( 'cover_list_style', 'minimal' ) );
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if ( ! ( is_single() || is_page() || is_archive() || is_author() || is_search() || is_404() || ( function_exists( 'cover_has_featured_posts' ) && cover_has_featured_posts() ) ) ) {
$header_class = ' bg';
}
- Create a ticketCreate a ticket
Method cover_use_custom_colors
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cover_use_custom_colors( $colors_css, $color, $contrast ) {
// Reset colors.
$colors_css = '';
$post_id = get_the_ID();
- Create a ticketCreate a ticket
Method cover_post_nav
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cover_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
- Create a ticketCreate a ticket
Function cover_post_nav
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function cover_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
- Read upRead up
- Create a ticketCreate a ticket
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
Function cover_posted_on
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function cover_posted_on() {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
- Read upRead up
- Create a ticketCreate a ticket
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
Function cover_scripts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function cover_scripts() {
wp_enqueue_style( 'GoogleFonts', '//fonts.googleapis.com/css?family=Source+Code+Pro|Montserrat|Open+Sans:400,600' );
wp_enqueue_style( 'cover-style', get_stylesheet_uri() );
- Read upRead up
- Create a ticketCreate a ticket
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"