CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function fill_query_vars has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function fill_query_vars($array) {
        $keys = array(
            'error'
            , 'm'
            , 'p'
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 25 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_site_admin has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function is_site_admin( $user_login = '' ) {
    _deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' );

    if ( empty( $user_login ) ) {
        $user_id = get_current_user_id();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-deprecated.php - About 25 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 paginate_comments_links has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function paginate_comments_links($args = array()) {
    global $wp_query, $wp_rewrite;

    if ( !is_singular() || !get_option('page_comments') )
        return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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_next_comments_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_next_comments_link( $label = '', $max_page = 0 ) {
    global $wp_query;

    if ( !is_singular() || !get_option('page_comments') )
        return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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 Connected has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function Connected() {
    if(!empty($this->smtp_conn)) {
      $sock_status = socket_get_status($this->smtp_conn);
      if($sock_status["eof"]) {
        # hmm this is an odd situation... the socket is
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 25 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 Recipient has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function Recipient($to) {
    $this->error = null; # so no confusion is caused

    if(!$this->connected()) {
      $this->error = array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 25 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