CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function BigEndian2Int has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public static function BigEndian2Int($byteword, $synchsafe=false, $signed=false) {
        $intvalue = 0;
        $bytewordlen = strlen($byteword);
        if ($bytewordlen == 0) {
            return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.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 wp_admin_bar_new_content_menu has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
    $actions = array();

    $cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' );

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

    public function split_ns($string)
    {
        static $cache = array();
        if (!isset($cache[$string]))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.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_authority has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function set_authority($authority)
    {
        static $cache;
        if (!$cache)
            $cache = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.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 date_w3cdtf has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

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

    function request($url, $args = array()) {
        $defaults = array(
            'method' => 'GET', 'timeout' => 5,
            'redirection' => 5, 'httpversion' => '1.0',
            'blocking' => true,
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 _save has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _save( $image, $filename = null, $mime_type = null ) {
        list( $filename, $extension, $mime_type ) = $this->get_output_format( $filename, $mime_type );

        if ( ! $filename )
            $filename = $this->generate_filename( null, null, $extension );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor-gd.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_constrain_size_for_editor has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function image_constrain_size_for_editor($width, $height, $size = 'medium') {
    global $content_width, $_wp_additional_image_sizes;

    if ( is_array($size) ) {
        $max_width = $size[0];
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 get_bookmark has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
    global $wpdb;

    if ( empty($bookmark) ) {
        if ( isset($GLOBALS['link']) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/bookmark.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_post_class has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function get_post_class( $class = '', $post_id = null ) {
    $post = get_post($post_id);

    $classes = array();

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

    public function get_available_widgets() {
        static $available_widgets = array();
        if ( ! empty( $available_widgets ) ) {
            return $available_widgets;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.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 _compareseq has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function _compareseq ($xoff, $xlim, $yoff, $ylim)
    {
        /* Slide down the bottom initial diagonal. */
        while ($xoff < $xlim && $yoff < $ylim
               && $this->xv[$xoff] == $this->yv[$yoff]) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.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 query has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function query($query) {
        if ( ! $this->ready )
            return false;

        // filter the query, if filters are available
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.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 script_concat_settings has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function script_concat_settings() {
    global $concatenate_scripts, $compress_scripts, $compress_css;

    $compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') );

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

    final protected function multidimensional( &$root, $keys, $create = false ) {
        if ( $create && empty( $root ) )
            $root = array();

        if ( ! isset( $root ) || empty( $keys ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-setting.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 date_w3cdtf has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function date_w3cdtf($date)
    {
        static $pcre;
        if (!$pcre)
        {
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 handle_404 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function handle_404() {
        global $wp_query;

        // If we've already issued a 404, bail.
        if ( is_404() )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp.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 add_option has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
    global $wpdb;

    if ( !empty( $deprecated ) )
        _deprecated_argument( __FUNCTION__, '2.3' );
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 is_email has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function is_email( $email, $check_dns = false ) {
    // Test for the minimum length the email can be
    if ( strlen( $email ) < 3 ) {
        return apply_filters( 'is_email', false, $email, 'email_too_short' );
    }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.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 EncodeHeader has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  function EncodeHeader ($str, $position = 'text') {
    $x = 0;

    switch (strtolower($position)) {
      case 'phrase':
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.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