CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method process_posts has 140 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function process_posts() {
        global $wpdb;

        $handle = $this->fopen($this->file, 'r');
        if ( $handle == null )
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/import/mt.php - About 5 hrs to fix

    Function create has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

      function create($p_filelist)
      {
        $v_result=1;
    
        // ----- Reset the error handler
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 5 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 page_rows has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    function page_rows($pages, $pagenum = 1, $per_page = 20) {
        global $wpdb;
    
        $level = 0;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 5 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 _display_rows_hierarchical has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
            global $wpdb;
    
            $level = 0;
    
    

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

    function get_admin_page_parent( $parent = '' ) {
        global $parent_file;
        global $menu;
        global $submenu;
        global $pagenow;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 5 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 dispatch has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        function dispatch()
        {
    
            if (empty ($_GET['step']))
                $step = 0;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php - About 5 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 cron_recheck has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function cron_recheck() {
            global $wpdb;
    
            $api_key = self::get_api_key();
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.php - About 5 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 QuicktimeParseNikonNCTG has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        public function QuicktimeParseNikonNCTG($atom_data) {
            // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
            // Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from some Nikon cameras such as the Coolpix S8000 and D5100
            // Data is stored as records of:
            // * 4 bytes record type

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

        function get_real_type($find_handler = false)
        {
            // If it's Odeo, let's get it out of the way.
            if (substr(strtolower($this->get_link()), 0, 15) === 'http://odeo.com')
            {
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 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 _bind has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        final protected function _bind() {
            if ( $this->bound )
                return;
    
            // Add the root node.
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-admin-bar.php - About 5 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_active_blog_for_user has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    function get_active_blog_for_user( $user_id ) {
        global $wpdb;
        $blogs = get_blogs_of_user( $user_id );
        if ( empty( $blogs ) )
            return null;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 5 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

    Method wp_save_image has 139 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function wp_save_image($post_id) {
        $return = '';
        $success = $delete = $scaled = $nocrop = false;
        $post = get_post($post_id);
        @ini_set('memory_limit', '256M');
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.php - About 5 hrs to fix

      Method initialise_blog_option_info has 139 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function initialise_blog_option_info() {
              global $wp_version;
      
              $this->blog_options = array(
                  // Read only options
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 5 hrs to fix

        Method parse has 139 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function parse(&$data, $encoding)
            {
                // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character
                if (strtoupper($encoding) === 'US-ASCII')
                {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php - About 5 hrs to fix

          Method parse has 139 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function parse(&$data, $encoding)
              {
                  // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character
                  if (strtoupper($encoding) === 'US-ASCII')
                  {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 hrs to fix

            Method RegisterRoutes has 139 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public static void RegisterRoutes(RouteCollection routes)
                    {
                        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
                        routes.IgnoreRoute("AdminAppV2");
            
            Severity: Major
            Found in Web.Admin/App_Start/RouteConfig.cs - About 5 hrs to fix

              File responsive-nav.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*! responsive-nav.js 1.0.32
               * https://github.com/viljamis/responsive-nav.js
               * http://responsive-nav.com
               *
               * Copyright (c) 2014 @viljamis
              Severity: Minor
              Found in Web.Admin/2015/js/responsive-nav.js - About 5 hrs to fix

                File responsive-nav.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*! responsive-nav.js 1.0.32
                 * https://github.com/viljamis/responsive-nav.js
                 * http://responsive-nav.com
                 *
                 * Copyright (c) 2014 @viljamis
                Severity: Minor
                Found in Web.Admin/2014/js/responsive-nav.js - About 5 hrs to fix

                  File functions.php has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * @package WordPress
                   * @subpackage Default_Theme
                   */
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.php - About 5 hrs to fix

                    Function reportController has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var reportController = function ($scope, $http, $q, $location, modalFactory, dataService) {
                            var url = $location.absUrl();
                            var lastSlash = url.lastIndexOf('/');
                            var year = url.slice(lastSlash + 1);
                    
                    
                    Severity: Major
                    Found in Web.Admin/AdminApp/Controllers/controller.reports.js - About 5 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language