84% recaptcha-for-asgaros-forum

Code Review | reCAPTCHA (v2 & v3) for Asgaros Forum

WordPress plugin reCAPTCHA (v2 & v3) for Asgaros Forum scored84%from 54 tests.

About plugin

  • Plugin page: recaptcha-for-asg...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2018
  • Latest release: Aug 1, 2023
  • Number of updates: 17
  • Update frequency: every 101.5 days
  • Top authors: hiteshchandwani (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

5,000+ active /31,312 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.52ms] Passed 4 tests

An overview of server-side resources used by reCAPTCHA (v2 & v3) for Asgaros Forum
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.56 ▼0.28
Dashboard /wp-admin3.31 ▲0.0147.36 ▼8.17
Posts /wp-admin/edit.php3.37 ▲0.0148.49 ▼0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.76 ▼29.29
Media Library /wp-admin/upload.php3.24 ▲0.0135.75 ▲0.03
reCAPTCHA /wp-admin/admin.php?page=asgaros-recaptcha3.2536.67

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by reCAPTCHA (v2 & v3) for Asgaros Forum
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.18 ▼1.115.18 ▲3.4444.00 ▲2.25
Dashboard /wp-admin2,224 ▲215.88 ▼0.16112.24 ▲10.3742.23 ▼2.29
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0333.85 ▼2.3337.67 ▲0.19
Add New Post /wp-admin/post-new.php1,545 ▲1423.51 ▲0.33626.27 ▼40.3466.61 ▲9.98
Media Library /wp-admin/upload.php1,400 ▲94.20 ▼0.0498.04 ▼7.8743.95 ▼5.68
reCAPTCHA /wp-admin/admin.php?page=asgaros-recaptcha9642.1926.9923.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-asgaros-forum/src/ReCaptcha/RequestMethod/CurlPost.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/recaptcha-for-asgaros-forum/recaptcha.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-asgaros-forum/src/ReCaptcha/RequestMethod/SocketPost.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recaptcha-for-asgaros-forum/src/ReCaptcha/RequestMethod/Post.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/recaptcha-for-asgaros-forum/recaptcha-for-asgaros-forum.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Input google reCAPTCHA site Keys.), #2 (This is how it looks on front-end.)
You can look at the official readme.txt

recaptcha-for-asgaros-forum/recaptcha-for-asgaros-forum.php 92% from 13 tests

The main PHP script in "reCAPTCHA (v2 & v3) for Asgaros Forum" version 1.0.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin597 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12155610597

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin