lancew/DojoList

View on GitHub
lib/recaptchalib.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
    if ($privkey == null || $privkey == '') {
        die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
    }
Severity: Minor
Found in lib/recaptchalib.php - About 1 hr to fix

    Method recaptcha_check_answer has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
    Severity: Minor
    Found in lib/recaptchalib.php - About 35 mins to fix

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

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.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

      The function recaptcha_check_answer() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.1

      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

      Example:

      // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

      Source: http://phpmd.org/rules/codesize.txt

      The method recaptcha_get_html has a boolean flag argument $use_ssl, which is a certain sign of a Single Responsibility Principle violation.
      Open

      function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example:

      class Foo {
            public function bar($flag = true) {
            }
        }

      Source: http://phpmd.org/rules/cleancode.txt

      The method _recaptcha_mailhide_email_parts uses an else expression. Else is never necessary and you can simplify the code to work without else.
      Open

          } else {
              $arr[0] = substr($arr[0], 0, 4);
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 1.4.0

      An if expression with an else branch is never necessary. You can rewrite the conditions in a way that the else is not necessary and the code becomes simpler to read. To achieve this use early return statements. To achieve this you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example:

      class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

      Source: http://phpmd.org/rules/cleancode.txt

      The method recaptcha_check_answer uses an else expression. Else is never necessary and you can simplify the code to work without else.
      Open

          else {
              $recaptcha_response->is_valid = false;
              $recaptcha_response->error = $answers [1];
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 1.4.0

      An if expression with an else branch is never necessary. You can rewrite the conditions in a way that the else is not necessary and the code becomes simpler to read. To achieve this use early return statements. To achieve this you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example:

      class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

      Source: http://phpmd.org/rules/cleancode.txt

      The method recaptcha_get_html uses an else expression. Else is never necessary and you can simplify the code to work without else.
      Open

          } else {
              $server = RECAPTCHA_API_SERVER;
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 1.4.0

      An if expression with an else branch is never necessary. You can rewrite the conditions in a way that the else is not necessary and the code becomes simpler to read. To achieve this use early return statements. To achieve this you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example:

      class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

      Source: http://phpmd.org/rules/cleancode.txt

      Avoid unused local variables such as '$errstr'.
      Open

          if(false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example:

      class Foo {
            public function doSomething()
            {
                $i = 5; // Unused
            }
        }

      Source: http://phpmd.org/rules/unusedcode.txt

      The function _recaptcha_aes_encrypt() contains an exit expression.
      Open

              die("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      Avoid unused local variables such as '$errno'.
      Open

          if(false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example:

      class Foo {
            public function doSomething()
            {
                $i = 5; // Unused
            }
        }

      Source: http://phpmd.org/rules/unusedcode.txt

      The function _recaptcha_http_post() contains an exit expression.
      Open

              die('Could not open socket');
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      The function recaptcha_get_html() contains an exit expression.
      Open

              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      The function recaptcha_check_answer() contains an exit expression.
      Open

              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      The function recaptcha_mailhide_url() contains an exit expression.
      Open

              die(
                  "To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
                  "you can do so at <a href='http://mailhide.recaptcha.net/apikey'>http://mailhide.recaptcha.net/apikey</a>"
              );
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      The function recaptcha_check_answer() contains an exit expression.
      Open

              die("For security reasons, you must pass the remote ip to reCAPTCHA");
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example:

      class Foo {
            public function bar($param)  {
                if ($param === 42) {
                    exit(23);
                }
            }
        }

      Source: http://phpmd.org/rules/design.txt

      Avoid variables with short names like $ky. Configured minimum length is 3.
      Open

      function _recaptcha_aes_encrypt($val,$ky) 
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a field, local, or parameter has a very short name.

      Example:

      class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

      Source: http://phpmd.org/rules/naming.txt

      Avoid variables with short names like $x. Configured minimum length is 3.
      Open

      function _recaptcha_mailhide_urlbase64($x) 
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a field, local, or parameter has a very short name.

      Example:

      class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

      Source: http://phpmd.org/rules/naming.txt

      The property $is_valid is not named in camelCase.
      Open

      class ReCaptchaResponse
      {
              var $is_valid;
              var $error;
      }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name attributes.

      Example:

      class ClassName {
            protected $property_name;
        }

      Source: http://phpmd.org/rules/controversial.txt

      The parameter $use_ssl is not named in camelCase.
      Open

      function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
      {
          if ($pubkey == null || $pubkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name parameters.

      Example:

      class ClassName {
            public function doSomething($user_name) {
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      Avoid variables with short names like $ky. Configured minimum length is 3.
      Open

          $ky = pack('H*', $privkey);
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a field, local, or parameter has a very short name.

      Example:

      class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

      Source: http://phpmd.org/rules/naming.txt

      Avoid variables with short names like $fs. Configured minimum length is 3.
      Open

          if(false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      Detects when a field, local, or parameter has a very short name.

      Example:

      class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

      Source: http://phpmd.org/rules/naming.txt

      The parameter $extra_params is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name parameters.

      Example:

      class ClassName {
            public function doSomething($user_name) {
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $use_ssl is not named in camelCase.
      Open

      function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
      {
          if ($pubkey == null || $pubkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $block_size is not named in camelCase.
      Open

      function _recaptcha_aes_pad($val) 
      {
          $block_size = 16;
          $numpad = $block_size - (strlen($val) % $block_size);
          return str_pad($val, strlen($val) + $numpad, chr($numpad));
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $block_size is not named in camelCase.
      Open

      function _recaptcha_aes_pad($val) 
      {
          $block_size = 16;
          $numpad = $block_size - (strlen($val) % $block_size);
          return str_pad($val, strlen($val) + $numpad, chr($numpad));
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $block_size is not named in camelCase.
      Open

      function _recaptcha_aes_pad($val) 
      {
          $block_size = 16;
          $numpad = $block_size - (strlen($val) % $block_size);
          return str_pad($val, strlen($val) + $numpad, chr($numpad));
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $extra_params is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $http_request is not named in camelCase.
      Open

      function _recaptcha_http_post($host, $path, $data, $port = 80) 
      {
      
              $req = _recaptcha_qsencode($data);
      
      
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      The variable $recaptcha_response is not named in camelCase.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      {
          if ($privkey == null || $privkey == '') {
              die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
          }
      Severity: Minor
      Found in lib/recaptchalib.php by phpmd

      Since: PHPMD 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example:

      class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

      Source: http://phpmd.org/rules/controversial.txt

      There are no issues that match your filters.

      Category
      Status