CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function dispatch has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function dispatch() {
        global $wpdb, $user_ID;
$step = $_POST['step'];
if (!$step) $step = 0;
?>
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/opml.php - About 4 hrs 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 users2wp has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function users2wp($users='')
    {
        // General Housekeeping
        global $wpdb;
        $count = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php - About 4 hrs 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_newComment has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_newComment($args) {
        global $wpdb;

        $this->escape($args);

Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.php - About 4 hrs 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_newComment has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_newComment($args) {
        global $wpdb;

        $this->escape($args);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 4 hrs 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_bloginfo has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

function get_bloginfo($show = '', $filter = 'raw') {

    switch($show) {
        case 'url' :
        case 'home' : // DEPRECATED
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/general-template.php - About 4 hrs 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 Analyze has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function Analyze() {
        $info = &$this->getid3->info;

        ///AH
        $info['ac3']['raw']['bsi'] = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php - About 4 hrs 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_authors has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_authors()
    {
        $authors = array();
        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php - About 4 hrs 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_list_post_revisions has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

function wp_list_post_revisions( $post_id = 0, $args = null ) {
    if ( !$post = get_post( $post_id ) )
        return;

    $defaults = array( 'parent' => false, 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 4 hrs 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_authors has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function get_authors()
    {
        $authors = array();
        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 hrs 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 send_headers has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    function send_headers() {
        $headers = array('X-Pingback' => get_bloginfo('pingback_url'));
        $status = null;
        $exit_required = false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 4 hrs 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 arrivalsController has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var arrivalsController = function ($scope, $http, $q, $location, modalFactory, dataService) {
        var url = $location.absUrl();
        var lastSlash = url.lastIndexOf('/');
        var province = url.slice(lastSlash + 1);
        var year = url.slice(lastSlash - 4, lastSlash);
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.arrivals.js - About 4 hrs to fix

    Method pingback_ping has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function pingback_ping($args) {
            global $wpdb;
    
            do_action('xmlrpc_call', 'pingback.ping');
    
    
    Severity: Major
    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 4 hrs to fix

      Method HandleAllTags has 101 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function HandleAllTags() {
      
              // key name => array (tag name, character encoding)
              static $tags;
              if (empty($tags)) {
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 4 hrs to fix

        Method get_blog_details has 101 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function get_blog_details( $fields = null, $get_all = true ) {
            global $wpdb;
        
            if ( is_array($fields ) ) {
                if ( isset($fields['blog_id']) ) {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.php - About 4 hrs to fix

          File ng-file-upload-shim.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**!
           * AngularJS file upload/drop directive and service with progress and abort
           * FileAPI Flash shim for old browsers not supporting FormData 
           * @author  Danial  <danial.farid@gmail.com>
           * @version 4.2.1
          Severity: Minor
          Found in Web.Admin/z-scripts/ng-file-upload-shim.js - About 4 hrs to fix

            Method import_posts has 100 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function import_posts() {
                    global $wpdb, $current_user;
            
                    set_magic_quotes_runtime(0);
                    $importdata = file($this->file); // Read the file into an array
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/import/blogware.php - About 4 hrs to fix

              SimplePie_Item has 32 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class SimplePie_Item
              {
                  /**
                   * Parent feed
                   *
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php - About 4 hrs to fix

                wpdb has 32 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class wpdb {
                
                    /**
                     * Whether to show SQL/DB errors
                     *
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/wp-db.php - About 4 hrs to fix

                  Method privMerge has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function privMerge(&$p_archive_to_add)
                    {
                      $v_result=1;
                  
                      // ----- Look if the archive_to_add exists
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs to fix

                    Method edit_user has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function edit_user( $user_id = 0 ) {
                        global $current_user, $wp_roles, $wpdb;
                        if ( $user_id != 0 ) {
                            $update = true;
                            $user->ID = (int) $user_id;
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/user.php - About 3 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language