CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function get_iauthority has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function get_iauthority()
    {
        if ($this->iuserinfo !== null || $this->ihost !== null || $this->port !== null)
        {
            $iauthority = '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 55 mins 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_register_sidebar_widget has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_register_sidebar_widget($id, $name, $output_callback, $options = array()) {
    global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks;

    $id = strtolower($id);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/widgets.php - About 55 mins 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_base has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_base()
    {
        if ($this->dom === null)
        {
            throw new SimplePie_Exception('DOMDocument not found, unable to use locator');
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Locator.php - About 55 mins 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 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function __get($name)
    {
        // isset() returns false for null, we don't want to do that
        // Also why we use array_key_exists below instead of isset()
        $props = get_object_vars($this);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 55 mins 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_updated_date has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_updated_date($date_format = 'j F Y, g:i a')
    {
        if (!isset($this->data['updated']))
        {
            if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated'))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php - About 55 mins 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_build has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static function get_build()
    {
        $root = dirname(dirname(__FILE__));
        if (file_exists($root . '/.git/index'))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 55 mins 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_rfc850 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function date_rfc850($date)
    {
        static $pcre;
        if (!$pcre)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 55 mins 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 __construct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($location, $name, $type)
    {
        $this->options = array(
            'user' => null,
            'pass' => null,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/MySQL.php - About 55 mins 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 chunked has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function chunked()
    {
        if (!preg_match('/^([0-9a-f]+)[^\r\n]*\r\n/i', trim($this->body)))
        {
            $this->state = 'emit';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/HTTP/Parser.php - About 55 mins 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 value has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function value()
    {
        if ($this->is_linear_whitespace())
        {
            $this->linear_whitespace();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/HTTP/Parser.php - About 55 mins 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 test has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function test($args = array()) {
        if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
            return false;

        $use = true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 55 mins 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_delete_nav_menu has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_delete_nav_menu( $menu ) {
    $menu = wp_get_nav_menu_object( $menu );
    if ( ! $menu )
        return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 55 mins 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_widget_rss_process has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
    $items = (int) $widget_rss['items'];
    if ( $items < 1 || 20 < $items )
        $items = 10;
    $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/default-widgets.php - About 55 mins 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_rss has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_rss( $url, $num_items = -1 ) {
    if ( $rss = fetch_rss( $url ) ) {
        echo '<ul>';

        if ( $num_items !== -1 ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 55 mins 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_downsize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function image_downsize($id, $size = 'medium') {

    if ( !wp_attachment_is_image($id) )
        return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 55 mins 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_tag_cloud has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_tag_cloud( $args = '' ) {
    $defaults = array(
        'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
        'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
        'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/category-template.php - About 55 mins 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 print_error has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function print_error($str = '') {
        global $EZSQL_ERROR;

        if (!$str) $str = mysql_error($this->dbh);
        $EZSQL_ERROR[] = array ('query' => $this->last_query, 'error_str' => $str);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.php - About 55 mins 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_user_by has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function get_user_by($field, $value) {
    global $wpdb;

    switch ($field) {
        case 'id':
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 55 mins 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 unknown has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function unknown()
    {
        $ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20");
        if (strtolower(substr($this->file->body, $ws, 14)) === '<!doctype html'
            || strtolower(substr($this->file->body, $ws, 5)) === '<html'
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 55 mins 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_notify_moderator has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_notify_moderator($comment_id) {
    global $wpdb;

    if( get_option( "moderation_notify" ) == 0 )
        return true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 55 mins 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