CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function do_action has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function do_action($tag, $arg = '') {
    global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;

    if ( is_array($wp_actions) )
        $wp_actions[] = $tag;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/plugin.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 translate_header has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private function translate_header( $header, $value ) {
        switch ( $header ) {
            case 'Name' :
                // Cached for sorting reasons.
                if ( isset( $this->name_translated ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.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_item has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function do_item( $handle, $group = false ) {
        if ( !parent::do_item($handle) )
            return false;

        if ( 0 === $group && $this->groups[$handle] > 0 ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class.wp-scripts.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_date_permastruct has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function get_date_permastruct() {
        if (isset($this->date_structure)) {
            return $this->date_structure;
        }

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

function wp_set_lang_dir() {
    if ( !defined( 'WP_LANG_DIR' ) ) {
        if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) || !@is_dir(ABSPATH . WPINC . '/languages') ) {
            define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' ); // no leading slash, no trailing slash, full path, not relative to ABSPATH
            if ( !defined( 'LANGDIR' ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/load.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 display_element has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {

        if ( !$element )
            return;

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

    static function verify_ssl_certificate( $stream, $host ) {
        $context_options = stream_context_get_options( $stream );

        if ( empty( $context_options['ssl']['peer_certificate'] ) )
            return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-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 markup_header has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private function markup_header( $header, $value, $translate ) {
        switch ( $header ) {
            case 'Name' :
                if ( empty( $value ) )
                    $value = $this->get_stylesheet();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.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 12 (exceeds 5 allowed). Consider refactoring.
Open

function set_site_transient( $transient, $value, $expiration = 0 ) {

    /**
     * Filter the value of a specific site transient before it is set.
     *
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 get_edit_post_link has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function get_edit_post_link( $id = 0, $context = 'display' ) {
    if ( !$post = &get_post( $id ) )
        return;

    if ( 'display' == $context )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-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 handle_404 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function handle_404() {
        global $wp_query;

        if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
            // Don't 404 for these queries if they matched an object.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.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_delete_post_link has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function get_delete_post_link($id = 0, $context = 'display') {
    if ( !$post = &get_post( $id ) )
        return;

    if ( 'display' == $context )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-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 wp_old_slug_redirect has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function wp_old_slug_redirect () {
    global $wp_query;
    if ( is_404() && '' != $wp_query->query_vars['name'] ) :
        global $wpdb;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/query.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 _makeFlashImage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function _makeFlashImage(opts, base64, fn){
            var
                  key
                , flashId = api.uid()
                , el = document.createElement('div')
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

    Function dw_getRandomImage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function dw_getRandomImage(rObj, bReturn) {
        var imgAr = rObj.images;  if (!imgAr ) return '';
        var num = Math.floor( Math.random() * imgAr.length );
        var imgStr = '';   var imgFile = imgAr[ num ];
        rObj.num = num; // hold which img selected (for ctr)
    Severity: Minor
    Found in Web.Admin/2015/js/dw_rotator_aux.js - About 1 hr to fix

      Function rescale has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          rescale : function( width, height, complete ) {
      
              var self = this;
      
              // allow rescale(fn)
      Severity: Minor
      Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

        Function dw_getRandomImage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function dw_getRandomImage(rObj, bReturn) {
            var imgAr = rObj.images;  if (!imgAr ) return '';
            var num = Math.floor( Math.random() * imgAr.length );
            var imgStr = '';   var imgFile = imgAr[ num ];
            rObj.num = num; // hold which img selected (for ctr)
        Severity: Minor
        Found in Web.Admin/2014/js/dw_rotator_aux.js - About 1 hr to fix

          Function action has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              action : function(postid, nonce, action) {
                  var t = this, data, w, h, fw, fh;
          
                  if ( t.notsaved(postid) )
                      return false;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 1 hr to fix

            Function open has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    open: function( src ) {
                        var hash;
            
                        if ( this.active )
                            return;
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/customize-loader.js - About 1 hr to fix

              Function save has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  api.save = function() {
                      var $hidden = $('#hiddenaction'),
                          oldVal = $hidden.val(),
                          $spinner = $('#wp-fullscreen-save .spinner'),
                          $saveMessage = $('#wp-fullscreen-save .wp-fullscreen-saved-message'),
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/wp-fullscreen.js - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language