94% recaptcha-for-bbpress

Code Review | reCAPTCHA for bbPress

WordPress plugin reCAPTCHA for bbPress scored 94% from 54 tests.

About plugin

  • Plugin page: recaptcha-for-bbp...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Nov 2, 2018
  • Latest release: Aug 14, 2021
  • Number of updates: 23
  • Update frequency: every 44.2 days
  • Top authors: hiteshchandwani (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active / 5,914 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼140.41ms] Passed 4 tests

A check of server-side resources used by reCAPTCHA for bbPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1436.19 ▲13.46
Dashboard /wp-admin3.09 ▲0.0347.52 ▲0.63
Posts /wp-admin/edit.php3.14 ▲0.0349.12 ▲0.40
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.54 ▼561.97
Media Library /wp-admin/upload.php3.03 ▲0.0335.14 ▼0.71

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for reCAPTCHA for bbPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10915.88 ▲0.408.19 ▼0.4348.89 ▼3.51
Dashboard /wp-admin2,970 ▲395.86 ▼0.07145.11 ▼4.83117.34 ▲0.57
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0067.32 ▼4.16101.96 ▲1.74
Add New Post /wp-admin/post-new.php1,500 ▼2,20618.56 ▼0.50377.68 ▼83.20124.71 ▲10.11
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.01162.48 ▲1.49125.08 ▲3.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/recaptcha-for-bbpress/recaptcha-for-bbpress.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-bbpress/src/ReCaptcha/RequestMethod/Post.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-bbpress/src/ReCaptcha/RequestMethod/CurlPost.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-bbpress/src/ReCaptcha/RequestMethod/SocketPost.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: recaptcha for bbpress, bbpress recaptcha v2, bbpress captcha, bbpress, bbpress captcha add-on...

recaptcha-for-bbpress/recaptcha-for-bbpress.php 85% from 13 tests

"reCAPTCHA for bbPress" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: The description should be shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected475 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11139611475

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.78
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods12.78%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected