CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

  function properties()
  {

    // ----- Reset the error handler
    $this->privErrorReset();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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 install_theme_search has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function install_theme_search($page) {
    global $theme_field_defaults;

    $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
    $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.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 privOptionDefaultThreshold has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function privOptionDefaultThreshold(&$p_options)
  {
    $v_result=1;

    if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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_bulk_actions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get_bulk_actions() {
        $actions = array();

        if ( is_multisite() ) {
            if ( current_user_can( 'remove_users' ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-users-list-table.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 sync_category_tag_slugs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function sync_category_tag_slugs( $term, $taxonomy ) {
    if ( global_terms_enabled() && ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) ) {
        if ( is_object( $term ) ) {
            $term->slug = sanitize_title( $term->name );
        } else {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ms.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 inline_edit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function inline_edit() {
        $tax = get_taxonomy( $this->screen->taxonomy );

        if ( ! current_user_can( $tax->cap->edit_terms ) )
            return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-terms-list-table.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 connect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function connect() {
        if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') )
            $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);
        else
            $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);

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

    function search_box( $text, $input_id ) {
        if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
            return;

        $input_id = $input_id . '-search-input';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.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 postbox_classes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function postbox_classes( $id, $page ) {
    if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id )
        return '';
    $current_user = wp_get_current_user();
    if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/post.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_editable_user_ids has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
    global $wpdb;

    $user = new WP_User( $user_id );

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

    function _readmsg($fnction="_readmsg"){
        if(!$this->_connected) {
            $this->PushError($fnction, 'Connect first');
            return FALSE;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp-pure.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 delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function delete($file, $recursive = false ) {
        if ( empty($file) )
            return false;
        if ( $this->is_file($file) )
            return @ftp_delete($this->link, $file);

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

    function unpack_package($package, $delete_package = true) {
        global $wp_filesystem;

        $this->skin->feedback('unpack_package');

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

function wp_edit_attachments_query( $q = false ) {
    if ( false === $q )
        $q = $_GET;

    $q['m']   = isset( $q['m'] ) ? (int) $q['m'] : 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/post.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 do_settings_sections has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function do_settings_sections($page) {
    global $wp_settings_sections, $wp_settings_fields;

    if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) )
        return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/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 do_settings_fields has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function do_settings_fields($page, $section) {
    global $wp_settings_fields;

    if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) )
        return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/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 run_command has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function run_command( $command, $returnbool = false) {

        if ( ! $this->link )
            return false;

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

    public function show_screen_options() {
        global $wp_meta_boxes;

        if ( is_bool( $this->_show_screen_options ) )
            return $this->_show_screen_options;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.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 post_rows has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function post_rows( $posts = array() ) {
    global $wp_query, $post, $mode;

    add_filter('the_title','esc_html');

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

    function file_exists($pathname) {
        $exists=true;
        if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE;
        else {
            if(!$this->_checkCode()) $exists=FALSE;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.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