CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/xmlrpc.php

Summary

Maintainability
F
1 mo
Test Coverage

File xmlrpc.php has 2103 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * XML-RPC protocol support for WordPress
 *
 * @license GPL v2 <./license.txt>
Severity: Major
Found in Web.Admin/2014/wordpress/xmlrpc.php - About 5 days to fix

    Function mw_editPost has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
    Open

        function mw_editPost($args) {
    
            $this->escape($args);
    
            $post_ID     = (int) $args[0];
    Severity: Minor
    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day 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 mw_newPost has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

        function mw_newPost($args) {
            $this->escape($args);
    
            $blog_ID     = (int) $args[0]; // we will support this in the near future
            $username  = $args[1];
    Severity: Minor
    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day 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

    wp_xmlrpc_server has 62 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class wp_xmlrpc_server extends IXR_Server {
    
        /**
         * Register all of the XMLRPC methods that XMLRPC server understands.
         *
    Severity: Major
    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day to fix

      Method mw_editPost has 201 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function mw_editPost($args) {
      
              $this->escape($args);
      
              $post_ID     = (int) $args[0];
      Severity: Major
      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day to fix

        Method mw_newPost has 196 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function mw_newPost($args) {
                $this->escape($args);
        
                $blog_ID     = (int) $args[0]; // we will support this in the near future
                $username  = $args[1];
        Severity: Major
        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 7 hrs to fix

          Function pingback_ping has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
          Open

              function pingback_ping($args) {
                  global $wpdb;
          
                  do_action('xmlrpc_call', 'pingback.ping');
          
          
          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 mw_getPost has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

              function mw_getPost($args) {
          
                  $this->escape($args);
          
                  $post_ID     = (int) $args[0];
          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/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

          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 mw_getPost has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function mw_getPost($args) {
            
                    $this->escape($args);
            
                    $post_ID     = (int) $args[0];
            Severity: Major
            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 3 hrs to fix

              Method mw_getRecentPosts has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function mw_getRecentPosts($args) {
              
                      $this->escape($args);
              
                      $blog_ID     = (int) $args[0];
              Severity: Major
              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs to fix

                Method wp_getPage has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function wp_getPage($args) {
                        $this->escape($args);
                
                        $blog_id    = (int) $args[0];
                        $page_id    = (int) $args[1];
                Severity: Major
                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs to fix

                  Function mw_getRecentPosts has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function mw_getRecentPosts($args) {
                  
                          $this->escape($args);
                  
                          $blog_ID     = (int) $args[0];
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/xmlrpc.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 add_enclosure_if_new has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function add_enclosure_if_new($post_ID, $enclosure) {
                          if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
                  
                              $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'];
                              $found = false;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/xmlrpc.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

                  Method wp_xmlrpc_server has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function wp_xmlrpc_server() {
                          $this->methods = array(
                              // WordPress API
                              'wp.getUsersBlogs'        => 'this:wp_getUsersBlogs',
                              'wp.getPage'            => 'this:wp_getPage',
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs to fix

                    Method wp_newComment has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function wp_newComment($args) {
                            global $wpdb;
                    
                            $this->escape($args);
                    
                    
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs to fix

                      Method mw_newMediaObject has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function mw_newMediaObject($args) {
                              global $wpdb;
                      
                              $blog_ID     = (int) $args[0];
                              $username  = $wpdb->escape($args[1]);
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                        Method initialise_blog_option_info has 49 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: Minor
                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                          Method wp_editComment has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function wp_editComment($args) {
                                  $this->escape($args);
                          
                                  $blog_id    = (int) $args[0];
                                  $username    = $args[1];
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                            Method wp_getComment has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function wp_getComment($args) {
                                    $this->escape($args);
                            
                                    $blog_id    = (int) $args[0];
                                    $username    = $args[1];
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                              Function escape has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function escape(&$array) {
                                      global $wpdb;
                              
                                      if(!is_array($array)) {
                                          return($wpdb->escape($array));
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr 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_editComment has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function wp_editComment($args) {
                                      $this->escape($args);
                              
                                      $blog_id    = (int) $args[0];
                                      $username    = $args[1];
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr 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_getPage has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function wp_getPage($args) {
                                      $this->escape($args);
                              
                                      $blog_id    = (int) $args[0];
                                      $page_id    = (int) $args[1];
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr 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_getPageList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function wp_getPageList($args) {
                                      global $wpdb;
                              
                                      $this->escape($args);
                              
                              
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                Method wp_getComments has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function wp_getComments($args) {
                                        $this->escape($args);
                                
                                        $blog_id    = (int) $args[0];
                                        $username    = $args[1];
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                  Function wp_getComment has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      function wp_getComment($args) {
                                          $this->escape($args);
                                  
                                          $blog_id    = (int) $args[0];
                                          $username    = $args[1];
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr 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 mt_getRecentPostTitles has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function mt_getRecentPostTitles($args) {
                                  
                                          $this->escape($args);
                                  
                                          $blog_ID     = (int) $args[0];
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                    Method blogger_getRecentPosts has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function blogger_getRecentPosts($args) {
                                    
                                            $this->escape($args);
                                    
                                            $blog_ID    = (int) $args[1]; /* though we don't use it yet */
                                    Severity: Minor
                                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                      Method wp_newCategory has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function wp_newCategory($args) {
                                              $this->escape($args);
                                      
                                              $blog_id                = (int) $args[0];
                                              $username                = $args[1];
                                      Severity: Minor
                                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                        Method blogger_editPost has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function blogger_editPost($args) {
                                        
                                                $this->escape($args);
                                        
                                                $post_ID     = (int) $args[1];
                                        Severity: Minor
                                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                          Method wp_editPage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function wp_editPage($args) {
                                                  // Items not escaped here will be escaped in editPost.
                                                  $blog_id    = (int) $args[0];
                                                  $page_id    = (int) $this->escape($args[1]);
                                                  $username    = $this->escape($args[2]);
                                          Severity: Minor
                                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                            Method wp_getUsersBlogs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function wp_getUsersBlogs( $args ) {
                                                    // If this isn't on WPMU then just use blogger_getUsersBlogs
                                                    if( !function_exists( 'is_site_admin' ) ) {
                                                        array_unshift( $args, 1 );
                                                        return $this->blogger_getUsersBlogs( $args );
                                            Severity: Minor
                                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                              Method blogger_newPost has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  function blogger_newPost($args) {
                                              
                                                      $this->escape($args);
                                              
                                                      $blog_ID    = (int) $args[1]; /* though we don't use it yet */
                                              Severity: Minor
                                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

                                                Method wp_getPages has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    function wp_getPages($args) {
                                                        $this->escape($args);
                                                
                                                        $blog_id    = (int) $args[0];
                                                        $username    = $args[1];
                                                Severity: Minor
                                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

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

                                                      function wp_setOptions( $args ) {
                                                          $this->escape( $args );
                                                  
                                                          $blog_id    = (int) $args[0];
                                                          $username    = $args[1];
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.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_getComments has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      function wp_getComments($args) {
                                                          $this->escape($args);
                                                  
                                                          $blog_id    = (int) $args[0];
                                                          $username    = $args[1];
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.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 mt_getRecentPostTitles has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      function mt_getRecentPostTitles($args) {
                                                  
                                                          $this->escape($args);
                                                  
                                                          $blog_ID     = (int) $args[0];
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.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 set_custom_fields has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      function set_custom_fields($post_id, $fields) {
                                                          $post_id = (int) $post_id;
                                                  
                                                          foreach ( (array) $fields as $meta ) {
                                                              if ( isset($meta['id']) ) {
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.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 blogger_getRecentPosts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      function blogger_getRecentPosts($args) {
                                                  
                                                          $this->escape($args);
                                                  
                                                          $blog_ID    = (int) $args[1]; /* though we don't use it yet */
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 35 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 blogger_editPost has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      function blogger_editPost($args) {
                                                  
                                                          $this->escape($args);
                                                  
                                                          $post_ID     = (int) $args[1];
                                                  Severity: Minor
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 35 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 too many return statements within this method.
                                                  Open

                                                                      return(new IXR_Error(401, __("Invalid post type.")));
                                                  Severity: Major
                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return new IXR_Error( 403, __( 'A valid email address is required' ) );
                                                    Severity: Major
                                                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                  return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));
                                                      Severity: Major
                                                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                                return(new IXR_Error(401, __("You are not allowed to change the post author as this user.")));
                                                        Severity: Major
                                                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                      return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.'));
                                                          Severity: Major
                                                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                    return(new IXR_Error(401, __("You are not allowed to change the page author as this user.")));
                                                            Severity: Major
                                                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                      return wp_new_comment($comment);
                                                              Severity: Major
                                                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                            return new IXR_Error(0, __('The source URL and the target URL cannot both point to the same resource.'));
                                                                Severity: Major
                                                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                          return true;
                                                                  Severity: Major
                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.'));
                                                                    Severity: Major
                                                                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                  return new IXR_Error(500, $result->get_error_message());
                                                                      Severity: Major
                                                                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                    return new IXR_Error(500, __('For some strange yet very annoying reason, this post could not be edited.'));
                                                                        Severity: Major
                                                                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                  return true;
                                                                          Severity: Major
                                                                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                            return new IXR_Error(401, __('Sorry, you do not have the right to publish this page.'));
                                                                            Severity: Major
                                                                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                                  return new IXR_Error( 403, __( 'Comment author name and email are required' ) );
                                                                              Severity: Major
                                                                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                        return(true);
                                                                                Severity: Major
                                                                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                          return(new IXR_Error(401, __("You are not allowed to create pages as this user")));
                                                                                  Severity: Major
                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                return new IXR_Error(500, $result->get_error_message());
                                                                                    Severity: Major
                                                                                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                              return $post_ID;
                                                                                      Severity: Major
                                                                                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                      return new IXR_Error(16, __('The source URL does not exist.'));
                                                                                        Severity: Major
                                                                                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                  return sprintf(__('Pingback from %1$s to %2$s registered. Keep the web talking! :-)'), $pagelinkedfrom, $pagelinkedto);
                                                                                          Severity: Major
                                                                                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                    return strval($post_ID);
                                                                                            Severity: Major
                                                                                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                      return true;
                                                                                              Severity: Major
                                                                                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                            return new IXR_Error(500, $post_ID->get_error_message());
                                                                                                Severity: Major
                                                                                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return new IXR_Error(17, __('The source URL does not contain a link to the target URL, and so cannot be used as a source.'));
                                                                                                  Severity: Major
                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                            return true;
                                                                                                    Severity: Major
                                                                                                    Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                    return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn&#8217;t exist, or it is not a pingback-enabled resource.'));
                                                                                                      Severity: Major
                                                                                                      Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                      return new IXR_Error(48, __('The pingback has already been registered.'));
                                                                                                        Severity: Major
                                                                                                        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                              return(new IXR_Error(401, __("Invalid post type.")));
                                                                                                          Severity: Major
                                                                                                          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                    return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ) );
                                                                                                            Severity: Major
                                                                                                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                          return new IXR_Error(32, __('We cannot find a title on that page.'));
                                                                                                              Severity: Major
                                                                                                              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.'));
                                                                                                                Severity: Major
                                                                                                                Found in Web.Admin/2014/wordpress/xmlrpc.php - About 30 mins to fix

                                                                                                                  Function wp_getPages has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getPages($args) {
                                                                                                                          $this->escape($args);
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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 mw_newMediaObject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function mw_newMediaObject($args) {
                                                                                                                          global $wpdb;
                                                                                                                  
                                                                                                                          $blog_ID     = (int) $args[0];
                                                                                                                          $username  = $wpdb->escape($args[1]);
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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 pingback_extensions_getPingbacks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function pingback_extensions_getPingbacks($args) {
                                                                                                                  
                                                                                                                          global $wpdb;
                                                                                                                  
                                                                                                                          do_action('xmlrpc_call', 'pingback.extensions.getPingbacks');
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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 attach_uploads has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function attach_uploads( $post_ID, $post_content ) {
                                                                                                                          global $wpdb;
                                                                                                                  
                                                                                                                          // find any unattached files
                                                                                                                          $attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'" );
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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_newCategory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_newCategory($args) {
                                                                                                                          $this->escape($args);
                                                                                                                  
                                                                                                                          $blog_id                = (int) $args[0];
                                                                                                                          $username                = $args[1];
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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 _getOptions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function _getOptions($options)
                                                                                                                      {
                                                                                                                          $data = array( );
                                                                                                                          foreach( $options as $option ) {
                                                                                                                              if( array_key_exists( $option, $this->blog_options ) )
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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_getUsersBlogs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getUsersBlogs( $args ) {
                                                                                                                          // If this isn't on WPMU then just use blogger_getUsersBlogs
                                                                                                                          if( !function_exists( 'is_site_admin' ) ) {
                                                                                                                              array_unshift( $args, 1 );
                                                                                                                              return $this->blogger_getUsersBlogs( $args );
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 25 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

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if ( $logged_in ) {
                                                                                                                              $comment['comment_author'] = $wpdb->escape( $user->display_name );
                                                                                                                              $comment['comment_author_email'] = $wpdb->escape( $user->user_email );
                                                                                                                              $comment['comment_author_url'] = $wpdb->escape( $user->user_url );
                                                                                                                              $comment['user_ID'] = $user->ID;
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3226..3252

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 301.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_editPage($args) {
                                                                                                                          // Items not escaped here will be escaped in editPost.
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $page_id    = (int) $this->escape($args[1]);
                                                                                                                          $username    = $this->escape($args[2]);
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 2599..2637

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 273.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getTags( $args ) {
                                                                                                                          $this->escape( $args );
                                                                                                                  
                                                                                                                          $blog_id        = (int) $args[0];
                                                                                                                          $username        = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 2737..2769

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 271.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          foreach ( $p as $para ) {
                                                                                                                              if ( strpos($para, $pagelinkedto) !== false ) { // it exists, but is it a link?
                                                                                                                                  preg_match("|<a[^>]+?".$preg_target."[^>]*>([^>]+?)</a>|", $para, $context);
                                                                                                                  
                                                                                                                                  // If the URL isn't in a link context, keep looking
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5824..5849

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 262.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function mt_getTrackbackPings($args) {
                                                                                                                  
                                                                                                                          global $wpdb;
                                                                                                                  
                                                                                                                          $post_ID = intval($args);
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 7 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5593..5626

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 224.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_suggestCategories($args) {
                                                                                                                          $this->escape($args);
                                                                                                                  
                                                                                                                          $blog_id                = (int) $args[0];
                                                                                                                          $username                = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 6 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 2891..2919

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 221.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getCommentCount( $args ) {
                                                                                                                          $this->escape($args);
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 5 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3311..3335

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 183.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function blogger_getUserInfo($args) {
                                                                                                                  
                                                                                                                          $this->escape($args);
                                                                                                                  
                                                                                                                          $username = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 3 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3984..4009

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 157.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(isset($content_struct["mt_allow_comments"])) {
                                                                                                                              if(!is_numeric($content_struct["mt_allow_comments"])) {
                                                                                                                                  switch($content_struct["mt_allow_comments"]) {
                                                                                                                                      case "closed":
                                                                                                                                          $comment_status = "closed";
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 3 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4486..4515

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 153.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(isset($content_struct["mt_allow_pings"])) {
                                                                                                                              if(!is_numeric($content_struct["mt_allow_pings"])) {
                                                                                                                                  switch($content_struct['mt_allow_pings']) {
                                                                                                                                      case "closed":
                                                                                                                                          $ping_status = "closed";
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 3 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4517..4545

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 149.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(
                                                                                                                              isset($content_struct["wp_author_id"])
                                                                                                                              && ($user->ID != $content_struct["wp_author_id"])
                                                                                                                          ) {
                                                                                                                              switch($post_type) {
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 2 other locations - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4753..4768
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2380..2400

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 141.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(
                                                                                                                              isset($content_struct["wp_author_id"])
                                                                                                                              && ($user->ID != $content_struct["wp_author_id"])
                                                                                                                          ) {
                                                                                                                              switch($post_type) {
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 2 other locations - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4753..4768
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2072..2092

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 141.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if ( $cats = get_categories('get=all') ) {
                                                                                                                              foreach ( $cats as $cat ) {
                                                                                                                                  $struct['categoryId'] = $cat->term_id;
                                                                                                                                  $struct['parentId'] = $cat->parent;
                                                                                                                                  $struct['description'] = $cat->name;
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5225..5237

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 138.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getPageTemplates( $args ) {
                                                                                                                          $this->escape( $args );
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3399..3416

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 136.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(isset($content_struct["mt_allow_comments"])) {
                                                                                                                              if(!is_numeric($content_struct["mt_allow_comments"])) {
                                                                                                                                  switch($content_struct["mt_allow_comments"]) {
                                                                                                                                      case "closed":
                                                                                                                                          $comment_status = "closed";
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4770..4797

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 136.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(isset($content_struct["mt_allow_pings"])) {
                                                                                                                              if(!is_numeric($content_struct["mt_allow_pings"])) {
                                                                                                                                  switch($content_struct["mt_allow_pings"]) {
                                                                                                                                      case "closed":
                                                                                                                                          $ping_status = "closed";
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 4799..4825

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 132.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getCommentStatusList($args) {
                                                                                                                          $this->escape( $args );
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 131.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getPageStatusList( $args ) {
                                                                                                                          $this->escape( $args );
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 131.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                      function wp_getPostStatusList( $args ) {
                                                                                                                          $this->escape( $args );
                                                                                                                  
                                                                                                                          $blog_id    = (int) $args[0];
                                                                                                                          $username    = $args[1];
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 131.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if( !empty( $content_struct['post_type'] ) ) {
                                                                                                                              if( $content_struct['post_type'] == 'page' ) {
                                                                                                                                  $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
                                                                                                                                  $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
                                                                                                                                  $post_type = 'page';
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 hr to fix
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2323..2338

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 120.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if( !empty( $content_struct['post_type'] ) ) {
                                                                                                                              if( $content_struct['post_type'] == 'page' ) {
                                                                                                                                  $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
                                                                                                                                  $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
                                                                                                                                  $post_type = 'page';
                                                                                                                  Severity: Major
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 hr to fix
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2026..2041

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 120.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if( isset( $content_struct["{$post_type}_status"] ) ) {
                                                                                                                              switch( $content_struct["{$post_type}_status"] ) {
                                                                                                                                  case 'draft':
                                                                                                                                  case 'private':
                                                                                                                                  case 'publish':
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 45 mins to fix
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2099..2116

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 96.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if( isset( $content_struct["{$post_type}_status"] ) ) {
                                                                                                                              switch( $content_struct["{$post_type}_status"] ) {
                                                                                                                                  case 'draft':
                                                                                                                                  case 'private':
                                                                                                                                  case 'publish':
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 45 mins to fix
                                                                                                                  Web.Admin/2014/wordpress/xmlrpc.php on lines 2477..2494

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 96.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                  Open

                                                                                                                          if(!empty($data["overwrite"]) && ($data["overwrite"] == true)) {
                                                                                                                              // Get postmeta info on the object.
                                                                                                                              $old_file = $wpdb->get_row("
                                                                                                                                  SELECT ID
                                                                                                                                  FROM {$wpdb->posts}
                                                                                                                  Severity: Minor
                                                                                                                  Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 45 mins to fix
                                                                                                                  Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5291..5307

                                                                                                                  Duplicated Code

                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                  Tuning

                                                                                                                  This issue has a mass of 95.

                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                  Refactorings

                                                                                                                  Further Reading

                                                                                                                  There are no issues that match your filters.

                                                                                                                  Category
                                                                                                                  Status