CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-content/themes/twentythirteen/inc/custom-header.php

Summary

Maintainability
B
5 hrs
Test Coverage

Method twentythirteen_admin_header_style has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function twentythirteen_admin_header_style() {
    $header_image = get_header_image();
?>
    <style type="text/css" id="twentythirteen-admin-header-css">
    .appearance_page_custom-header #headimg {

    Method twentythirteen_header_style has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function twentythirteen_header_style() {
        $header_image = get_header_image();
        $text_color   = get_header_textcolor();
    
        // If no custom options for text are set, let's bail.

      Method twentythirteen_custom_header_setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function twentythirteen_custom_header_setup() {
          $args = array(
              // Text color and image (empty to use none).
              'default-text-color'     => '220e10',
              'default-image'          => '%s/images/headers/circle.png',

        Function twentythirteen_header_style has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function twentythirteen_header_style() {
            $header_image = get_header_image();
            $text_color   = get_header_textcolor();
        
            // If no custom options for text are set, let's bail.

        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

        There are no issues that match your filters.

        Category
        Status