CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function normalize has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function normalize () {
        // if atom populate rss fields
        if ( $this->is_atom() ) {
            $this->channel['descripton'] = $this->channel['tagline'];
            for ( $i = 0; $i < count($this->items); $i++) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 2 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_page_menu has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function wp_page_menu( $args = array() ) {
    $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
    $args = wp_parse_args( $args, $defaults );
    $args = apply_filters( 'wp_page_menu_args', $args );

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

    public function prepreview_added_widget_instance( $value = false ) {
        if ( ! preg_match( '/^(?:default_)?option_(widget_(.+))/', current_filter(), $matches ) ) {
            return $value;
        }
        $id_base = $matches[2];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 2 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_links has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function get_links()
    {
        $links = SimplePie_Misc::get_element('a', $this->file->body);
        foreach ($links as $link)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 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 array_unique has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function array_unique($array)
    {
        if (version_compare(PHP_VERSION, '5.2', '>='))
        {
            return array_unique($array);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 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_image_tags has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function get_image_tags($namespace, $tag)
    {
        $type = $this->get_type();
        if ($type & SIMPLEPIE_TYPE_RSS_10)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 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 compatible_gzinflate has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public static function compatible_gzinflate($gzData) {

        // Compressed data might contain a full header, if so strip it for gzinflate()
        if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) {
            $i = 10;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 2 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 CreateBody has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

  function CreateBody() {
    $result = '';
    if ($this->sign_key_file) {
      $result .= $this->GetMailMIME();
    }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 2 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 transform has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Image.transform = function (file, transform, autoOrientation, fn){
        function _transform(err, img){
            // img -- info object
            var
                  images = {}
Severity: Major
Found in Web.Admin/z-scripts/FileAPI.js - About 2 hrs to fix

    Function hotelController has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function _ExceptionDetails has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  var _ExceptionDetails = (function (_super) {
                      __extends(_ExceptionDetails, _super);
                      function _ExceptionDetails(exception) {
                          _super.call(this);
                          this.aiDataContract = {
      Severity: Major
      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

        Function filterStyles has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    function filterStyles(node, styleValue) {
                        var outputStyles = {}, styles = editor.dom.parseStyle(styleValue);
        
                        // Parse out list indent level for lists
                        if (node.name === 'p') {

          Function renderIframeUI has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function renderIframeUI(args) {
                  var panel, resizeHandleCtrl, startSize;
          
                  if (args.skinUiCss) {
                      tinymce.DOM.loadCSS(args.skinUiCss);

            Function edInsertTag has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function edInsertTag(myField, i) {
                //IE support
                if (document.selection) {
                    myField.focus();
                    var sel = document.selection.createRange();
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/quicktags.dev.js - About 2 hrs to fix

              Method wp_write_post has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function wp_write_post() {
                  global $user_ID;
              
                  if ( 'page' == $_POST['post_type'] ) {
                      if ( !current_user_can( 'edit_pages' ) )
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 2 hrs to fix

                Method prepare_items has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function prepare_items() {
                        global $status, $totals, $page, $orderby, $order, $s;
                
                        wp_reset_vars( array( 'orderby', 'order', 's' ) );
                
                

                  Method user_can_access_admin_page has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function user_can_access_admin_page() {
                      global $pagenow;
                      global $menu;
                      global $submenu;
                      global $_wp_menu_nopriv;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 2 hrs to fix

                    Method kubrick_add_theme_page has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function kubrick_add_theme_page() {
                        if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
                            if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
                                check_admin_referer('kubrick-header');
                                if ( isset($_REQUEST['njform']) ) {
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.php - About 2 hrs to fix

                      Method kubrick_theme_page has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function kubrick_theme_page() {
                          if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('Options saved.').'</strong></p></div>';
                      ?>
                      <div class='wrap'>
                          <h2><?php _e('Customize Header'); ?></h2>
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.php - About 2 hrs to fix

                        Method wp_delete_attachment has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_delete_attachment( $post_id, $force_delete = false ) {
                            global $wpdb;
                        
                            if ( !$post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) ) )
                                return $post;
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language