CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

    function _register() {
        $settings = $this->get_settings();
        $empty = true;

        if ( is_array($settings) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/widgets.php - About 35 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 do_strip_htmltags has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function do_strip_htmltags($match)
    {
        if ($this->encode_instead_of_strip)
        {
            if (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style')))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Sanitize.php - About 35 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 crypt_private has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function crypt_private($password, $setting)
    {
        $output = '*0';
        if (substr($setting, 0, 2) == $output)
            $output = '*1';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpass.php - About 35 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 is_admin_bar_showing has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function is_admin_bar_showing() {
    global $show_admin_bar, $pagenow;

    // For all these types of requests, we never want an admin bar.
    if ( defined('XMLRPC_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/admin-bar.php - About 35 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 load has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function load() {
        if ( $this->image instanceof Imagick )
            return true;

        if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor-imagick.php - About 35 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 scheme_normalization has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    protected function scheme_normalization()
    {
        if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo'])
        {
            $this->iuserinfo = null;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 35 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 quote has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

    protected static function change_encoding_mbstring($data, $input, $output)
    {
        if ($input === 'windows-949')
        {
            $input = 'EUC-KR';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 35 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 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct()
    {
        $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
        $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 35 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 atom_10_content_construct_type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function atom_10_content_construct_type($attribs)
    {
        if (isset($attribs['']['type']))
        {
            $type = strtolower(trim($attribs['']['type']));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 35 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 fix_protocol has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function fix_protocol($url, $http = 1)
    {
        $url = SimplePie_Misc::normalize_url($url);
        $parsed = SimplePie_Misc::parse_url($url);
        if ($parsed['scheme'] !== '' && $parsed['scheme'] !== 'http' && $parsed['scheme'] !== 'https')
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 35 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 connect has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function connect ($server, $port = 110)  {
        //  Opens a socket to the specified server. Unless overridden,
        //  port defaults to 110. Returns true on success, false on fail

        // If MAILSERVER is set, override $server with it's value
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.php - About 35 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_get_attachment_link has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false) {
    $id = intval($id);
    $_post = & get_post( $id );

    if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 35 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_attachment_icon_src has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function get_attachment_icon_src( $id = 0, $fullsize = false ) {
    $id = (int) $id;
    if ( !$post = & get_post($id) )
        return false;

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

    function get_row($query = null, $output = OBJECT, $y = 0) {
        $this->func_call = "\$db->get_row(\"$query\",$output,$y)";
        if ( $query )
            $this->query($query);
        else
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.php - About 35 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_default_scripts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function wp_default_scripts( &$scripts ) {

    if ( !$guessurl = site_url() )
        $guessurl = wp_guess_url();

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

function get_category_link( $category_id ) {
    global $wp_rewrite;
    $catlink = $wp_rewrite->get_category_permastruct();

    if ( empty( $catlink ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/category-template.php - About 35 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 _sort_nav_menu_items has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function _sort_nav_menu_items( $a, $b ) {
    global $_menu_item_sort_prop;

    if ( empty( $_menu_item_sort_prop ) )
        return 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 35 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 build_mysql_datetime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function build_mysql_datetime( $datetime, $default_to_max = false ) {
        $now = current_time( 'timestamp' );

        if ( ! is_array( $datetime ) ) {
            // @todo Timezone issues here possibly
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/date.php - About 35 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 _check has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function _check($from_lines, $to_lines)
    {
        if (serialize($from_lines) != serialize($this->getOriginal())) {
            trigger_error("Reconstructed original doesn't match", E_USER_ERROR);
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff.php - About 35 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