CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function get_currentuserinfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function get_currentuserinfo() {
    global $current_user;

    if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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 shortcode_parse_atts has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function shortcode_parse_atts($text) {
    $atts = array();
    $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
    $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
    if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/shortcodes.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 chunkTransferDecode has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function chunkTransferDecode($body) {
        $body = str_replace(array("\r\n", "\r"), "\n", $body);
        // The body is not chunked encoding or is malformed.
        if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) )
            return $body;
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 image_resize_dimensions has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {

    if ($orig_w <= 0 || $orig_h <= 0)
        return false;
    // at least one of dest_w or dest_h must be specific
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 change_encoding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function change_encoding($data, $input, $output)
    {
        $input = SimplePie_Misc::encoding($input);
        $output = SimplePie_Misc::encoding($output);

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 update_option has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function update_option( $option, $value ) {
    global $wpdb;

    $option = trim($option);
    if ( empty($option) )
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 update_usermeta has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function update_usermeta( $user_id, $meta_key, $meta_value ) {
    global $wpdb;
    if ( !is_numeric( $user_id ) )
        return false;
    $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/user.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 do_items has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function do_items( $handles = false, $group = false ) {
        // Print the queue if nothing is passed.  If a string is passed, print that script.  If an array is passed, print those scripts.
        $handles = false === $handles ? $this->queue : (array) $handles;
        $this->all_deps( $handles );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class.wp-dependencies.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 methodSignature has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function methodSignature($method) {
        if (!$this->hasMethod($method)) {
            return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.');
        }
        // We should be returning an array of types
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.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 set_site_transient has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function set_site_transient($transient, $value, $expiration = 0) {
    global $_wp_using_ext_object_cache, $wpdb;

    if ( $_wp_using_ext_object_cache ) {
        return wp_cache_set($transient, $value, 'site-transient', $expiration);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/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 delete_option has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function delete_option( $option ) {
    global $wpdb;

    $option = trim( $option );
    if ( empty( $option ) )
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

Method dropdown_cats has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
        $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
        $selected = 0, $exclude = 0) {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

    Method get_linksbyname has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
                             $show_description = true, $show_rating = false,
                             $limit = -1, $show_updated = 0) {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

      Function calculateType has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function calculateType() {
              if ($this->data === true || $this->data === false) {
                  return 'boolean';
              }
              if (is_integer($this->data)) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.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 set_transient has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function set_transient($transient, $value, $expiration = 0) {
          global $_wp_using_ext_object_cache, $wpdb;
      
          if ( $_wp_using_ext_object_cache ) {
              return wp_cache_set($transient, $value, 'transient', $expiration);
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/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 get_comment_link has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function get_comment_link( $comment = null, $args = array() ) {
          global $wp_rewrite, $in_comment_loop;
      
          $comment = get_comment($comment);
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/comment-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 the_content_rss has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
          _deprecated_function(__FUNCTION__, '2.9', 'the_content_feed' );
          $content = get_the_content($more_link_text, $stripteaser, $more_file);
          $content = apply_filters('the_content_rss', $content);
          if ( $cut && !$encode_html )
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/deprecated.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_create_blog has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
          $defaults = array( 'public' => 0 );
          $meta = wp_parse_args( $meta, $defaults );
      
          $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
      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 get_category_children has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
          _deprecated_function(__FUNCTION__, '2.8', 'get_term_children()');
          if ( 0 == $id )
              return '';
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/deprecated.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_html has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function get_html( $url, $args = '' ) {
              $provider = false;
      
              if ( !isset($args['discover']) )
                  $args['discover'] = true;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-oembed.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