CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function split_ns has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function split_ns($string)
    {
        static $cache = array();
        if (!isset($cache[$string]))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php - About 1 hr 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

Function date_w3cdtf has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function date_w3cdtf($date)
    {
        static $pcre;
        if (!$pcre)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 1 hr 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

Function get_available_widgets has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_available_widgets() {
        static $available_widgets = array();
        if ( ! empty( $available_widgets ) ) {
            return $available_widgets;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 1 hr 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

Function get_bookmark has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
    global $wpdb;

    if ( empty($bookmark) ) {
        if ( isset($GLOBALS['link']) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/bookmark.php - About 1 hr 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

Function get_post_class has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function get_post_class( $class = '', $post_id = null ) {
    $post = get_post($post_id);

    $classes = array();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 1 hr 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

Function image_constrain_size_for_editor has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function image_constrain_size_for_editor($width, $height, $size = 'medium') {
    global $content_width, $_wp_additional_image_sizes;

    if ( is_array($size) ) {
        $max_width = $size[0];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 1 hr 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

Function handle_404 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function handle_404() {
        global $wp_query;

        // If we've already issued a 404, bail.
        if ( is_404() )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp.php - About 1 hr 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

Function request has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function request($url, $args = array()) {
        $defaults = array(
            'method' => 'GET', 'timeout' => 5,
            'redirection' => 5, 'httpversion' => '1.0',
            'blocking' => true,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 1 hr 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

Function _save has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _save( $image, $filename = null, $mime_type = null ) {
        list( $filename, $extension, $mime_type ) = $this->get_output_format( $filename, $mime_type );

        if ( ! $filename )
            $filename = $this->generate_filename( null, null, $extension );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor-gd.php - About 1 hr 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

Function _compareseq has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function _compareseq ($xoff, $xlim, $yoff, $ylim)
    {
        /* Slide down the bottom initial diagonal. */
        while ($xoff < $xlim && $yoff < $ylim
               && $this->xv[$xoff] == $this->yv[$yoff]) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.php - About 1 hr 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

Function script_concat_settings has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function script_concat_settings() {
    global $concatenate_scripts, $compress_scripts, $compress_css;

    $compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/script-loader.php - About 1 hr 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

Function multidimensional has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    final protected function multidimensional( &$root, $keys, $create = false ) {
        if ( $create && empty( $root ) )
            $root = array();

        if ( ! isset( $root ) || empty( $keys ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-setting.php - About 1 hr 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

Function query has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function query($query) {
        if ( ! $this->ready )
            return false;

        // filter the query, if filters are available
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.php - About 1 hr 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

Function date_w3cdtf has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function date_w3cdtf($date)
    {
        static $pcre;
        if (!$pcre)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr 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

Function locate_template has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function locate_template($template_names, $load = false, $require_once = true ) {
    $located = '';
    foreach ( (array) $template_names as $template_name ) {
        if ( !$template_name )
            continue;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/template.php - About 1 hr 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

Function wpmu_activate_signup has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function wpmu_activate_signup($key) {
    global $wpdb;

    $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE activation_key = %s", $key) );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr 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

Function wp_get_sites has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_sites( $args = array() ) {
    global $wpdb;

    if ( wp_is_large_network() )
        return array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr 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

Function handle_redirects has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    static function handle_redirects( $url, $args, $response ) {
        // If no redirects are present, or, redirects were not requested, perform no action.
        if ( ! isset( $response['headers']['location'] ) || 0 === $args['_redirection'] )
            return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 1 hr 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

Function add_option has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
    global $wpdb;

    if ( !empty( $deprecated ) )
        _deprecated_argument( __FUNCTION__, '2.3' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr 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

Function get_transient has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function get_transient( $transient ) {

     /**
     * Filter the value of an existing transient.
     *
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr 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

Severity
Category
Status
Source
Language