wp-plugins/all-in-one-seo-pack

View on GitHub

Showing 399 of 427 total issues

Avoid deeply nested control flow statements.
Open

                            if ( !empty( $d ) ) {
                                if ( !empty( $domain_list ) )
                                    $domain_list .= ", ";
                                $domain_list .= "'" . $d . "'";
                            }
Severity: Major
Found in aioseop_class.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if( is_array( $module_options ) ) {
                                        foreach( $module_options as $key => $value ) {
                                            /* Update Post Data */
                                            if( $label == 'post_data' ) {
                                                $post_exists = post_exists( $module_options[$key]['post_title'], '', $module_options[$key]['post_date'] );
    Severity: Major
    Found in aioseop_importer_exporter.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( !empty( $image ) ) {
                                  $img[] = Array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
                              }
      Severity: Major
      Found in aioseop_module_class.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if ( empty( $options[$prefix . 'robotgen'] ) ) 
                                        $options = $this->load_files( $options, Array( 'robotgen' => 'robots.txt' ), $prefix );                            
        Severity: Major
        Found in aioseop_robots.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                            if ( is_array($output) )
                                $output[$t][] = $v;
          Severity: Major
          Found in aioseop_module_class.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( preg_match( '/' . $hosts . '/i', $hostname ) )
                                        return true;
            Severity: Major
            Found in aioseop_module_class.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                if(!isset($output[$t]))
                                  $output[$t] = array();
              Severity: Major
              Found in aioseop_module_class.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ( empty( $link_list[$l['order']] ) ) $link_list[$l['order']] = Array();
                Severity: Major
                Found in aioseop_functions.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if ( is_array( $image ) ) {
                                                  $img[] = Array( 'type' => 'attachment', 'id' => $id, 'link' => $image[0] );
                                              }
                  Severity: Major
                  Found in aioseop_module_class.php - About 45 mins to fix

                    Function split_header has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                          public static function split_header($header, $only_allow_oauth_parameters = true) {
                            $params = array();
                            if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) {
                              foreach ($matches[1] as $i => $h) {
                                $params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]);
                    Severity: Minor
                    Found in OAuth.php - About 45 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 update_options has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                            function update_options( $opts = Array(), $location = null, $defaults = null ) {
                                if ($location === null )
                                    $type = 'settings';
                                else
                                    $type = $this->locations[$location][$type];
                    Severity: Minor
                    Found in aioseop_module_class.php - About 45 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 delete_class_option has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                            function delete_class_option( $delete = false ) {
                                $option_name = $this->get_option_name();
                                if ( $this->store_option || $delete ) {
                                    delete_option( $option_name );
                                } else {
                    Severity: Minor
                    Found in aioseop_module_class.php - About 45 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

                    Avoid deeply nested control flow statements.
                    Open

                                            if ( isset( $options['meta_key'] ) ) {
                                                $meta_key = $options['meta_key'];
                                            }
                    Severity: Major
                    Found in aioseop_module_class.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if ( $post->ID == get_option( 'page_for_posts' ) )
                                                  $wp_query->is_home = true;
                      Severity: Major
                      Found in aioseop_module_class.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( empty( $excluded[$k] ) ) unset( $excluded[$k] );
                        Severity: Major
                        Found in aioseop_functions.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if ( $m[$tags['name']] == $tv )
                                                              $meta .= "<tr><th style='color:red;'>" . sprintf( __( 'Duplicate %s Meta'), ucwords( $type ) ) . "</th><td>" . ucwords( $tk ) . "</td><td>{$m[$tags['name']]}</td><td>{$m[$tags['value']]}</td></tr>\n";
                          Severity: Major
                          Found in aioseop_functions.php - About 45 mins to fix

                            Function get_class_option has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    function get_class_option( ) {
                                        $option_name = $this->get_option_name();
                                        if ( $this->store_option || $option_name == $this->parent_option ) {
                                            return get_option( $option_name );
                                        } else {
                            Severity: Minor
                            Found in aioseop_module_class.php - About 45 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 aioseop_handle_ignore_notice has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                function aioseop_handle_ignore_notice() {
                                    if ( !empty( $_GET ) ) {
                                        global $current_user;
                                        $user_id = $current_user->ID;
                                        if ( !empty( $_GET["aioseop_reset_notices"] ) ) {
                            Severity: Minor
                            Found in aioseop_functions.php - About 45 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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( !empty( $post_thumbnail_id ) )    {
                                                        $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
                                                        if ( is_array( $image ) ) {
                                                            $img[] = Array( 'type' => 'featured', 'id' => $post_thumbnail_id, 'link' => $image[0] );
                                                        }
                            Severity: Major
                            Found in aioseop_module_class.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ( $optimize ) $options[$prefix . 'robotgen'] = $robotgen;
                              Severity: Major
                              Found in aioseop_robots.php - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language