CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function _wptexturize_pushpop_element has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') {
    // Check if it is a closing tag -- otherwise assume opening tag
    if (strncmp($opening . '/', $text, 2)) {
        // Opening? Check $text+1 against disabled elements
        if (preg_match('/^' . $disabled_elements . '\b/', substr($text, 1), $matches)) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 55 mins 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_specialchars_decode has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
    $string = (string) $string;

    if ( 0 === strlen( $string ) ) {
        return '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 55 mins 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_metadata has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
    if ( !$meta_type )
        return false;

    $meta_cache = wp_cache_get($object_id, $meta_type . '_meta');
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/meta.php - About 55 mins 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_get_post_autosave has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_post_autosave( $post_id, $user_id = 0 ) {
    $revisions = wp_get_post_revisions( $post_id, array( 'check_enabled' => false ) );

    foreach ( $revisions as $revision ) {
        if ( false !== strpos( $revision->post_name, "{$post_id}-autosave" ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/revision.php - About 55 mins 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 SetMessageType has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  function SetMessageType() {
    if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) {
      $this->message_type = 'plain';
    } else {
      if(count($this->attachment) > 0) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 55 mins 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_output_format has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function get_output_format( $filename = null, $mime_type = null ) {
        $new_ext = $file_ext = null;
        $file_mime = null;

        // By default, assume specified type takes priority
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor.php - About 55 mins 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_comments_feed_link has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function get_post_comments_feed_link($post_id = '', $feed = '') {
    global $id;

    if ( empty($post_id) )
        $post_id = (int) $id;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 55 mins 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 UTF8CharBoundary has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  function UTF8CharBoundary($encodedText, $maxLength) {
    $foundSplitPos = false;
    $lookBack = 3;
    while (!$foundSplitPos) {
      $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 55 mins 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 Authenticate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  function Authenticate($username, $password) {
    // Start authentication
    fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);

    $rply = $this->get_lines();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 55 mins 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 linkFileSelect has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

function linkFileSelect(scope, elem, attr, ngModel, $parse, $timeout, $compile) {
Severity: Major
Found in Web.Admin/z-scripts/ng-file-upload.js - About 50 mins to fix

    Function linkFileSelect has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function linkFileSelect(scope, elem, attr, ngModel, $parse, $timeout, $compile) {
    Severity: Major
    Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 50 mins to fix

      Function linkDrop has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function linkDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
      Severity: Major
      Found in Web.Admin/z-scripts/ng-file-upload.js - About 50 mins to fix

        Function linkDrop has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function linkDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
        Severity: Major
        Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 50 mins to fix

          Function $httpBackend has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
          Severity: Major
          Found in Web.Admin/z-scripts/angular-mocks.js - About 50 mins to fix

            Function openSubWin has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function openSubWin(url, nm, x, y, w, h, atts) {
            Severity: Major
            Found in Web.Admin/2015/js/dw_rotator_aux.js - About 50 mins to fix

              Function reservationController has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  var reservationController = function ($scope, $http, $q, $location, modalFactory, dataService, moment) {
              Severity: Major
              Found in Web.Admin/AdminApp/Controllers/controller.reservation.js - About 50 mins to fix

                Function CreateSimpleException has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                                Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line, handledAt) {
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 50 mins to fix

                  Function openSubWin has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function openSubWin(url, nm, x, y, w, h, atts) {
                  Severity: Major
                  Found in Web.Admin/2014/js/dw_rotator_aux.js - About 50 mins to fix

                    Method add_meta_box has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) {
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 50 mins to fix

                      Method _cat_rows has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) {
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 50 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language