84% grecaptcha

Code Review | GreCAPTCHA

WordPress plugin GreCAPTCHA scored84%from 54 tests.

About plugin

  • Plugin page: grecaptcha
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Mar 23, 2021
  • Number of updates: 45
  • Update frequency: every 7.9 days
  • Top authors: Beherit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,554 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.12MB] [CPU: ▼7.19ms] Passed 4 tests

An overview of server-side resources used by GreCAPTCHA
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1144.52 ▼9.99
Dashboard /wp-admin3.43 ▲0.1249.98 ▼2.49
Posts /wp-admin/edit.php3.54 ▲0.1847.00 ▼7.62
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.22 ▼8.64
Media Library /wp-admin/upload.php3.35 ▲0.1242.57 ▲3.52
GreCAPTCHA /wp-admin/options-general.php?page=grecaptcha3.3241.35

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

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

Browser metrics Passed 4 tests

GreCAPTCHA: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.74 ▲0.131.96 ▲0.2443.53 ▼0.18
Dashboard /wp-admin2,204 ▲164.85 ▼0.06109.50 ▼17.6343.51 ▲2.64
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0536.70 ▼2.7435.32 ▲1.15
Add New Post /wp-admin/post-new.php1,536 ▲323.22 ▲0.08645.95 ▲5.2366.74 ▲9.71
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.00102.51 ▼35.6744.55 ▼0.22
GreCAPTCHA /wp-admin/options-general.php?page=grecaptcha1,0522.0327.5329.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=grecaptcha
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=grecaptcha
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=grecaptcha
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=grecaptcha
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
4 plugin tags: captcha, spam, bot, recaptcha

grecaptcha/grecaptcha.php Passed 13 tests

The entry point to "GreCAPTCHA" version 1.4 is a PHP file that has certain tags in its header comment area
89 characters long description:
Protects WordPress website forms from spam and brute-force attacks with Google reCAPTCHA.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin805 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9135351805

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods16.67%
▷ Protected methods1493.33%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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 files were detected