83% wp-google-recaptcha

Code Review | Add Google re captcha in Wordpress Forms

WordPress plugin Add Google re captcha in Wordpress Forms scored 83% from 54 tests.

About plugin

  • Plugin page: wp-google-recaptcha
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Nov 19, 2019
  • Number of updates: 13
  • Update frequency: every 22.2 days
  • Top authors: ravimakwana68 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 8,261 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.77ms] Passed 4 tests

Server-side resources used by Add Google re captcha in Wordpress Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.98 ▼3.28
Dashboard /wp-admin3.35 ▲0.0550.28 ▲2.19
Posts /wp-admin/edit.php3.40 ▲0.0450.79 ▲6.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.30 ▲5.77
Media Library /wp-admin/upload.php3.27 ▲0.0435.08 ▼1.59
reCAPTCHA /wp-admin/options-general.php?page=google_recaptcha-options3.2431.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Add Google re captcha in Wordpress Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.32 ▼1.281.70 ▼0.1447.62 ▲2.29
Dashboard /wp-admin2,213 ▲254.84 ▼1.0496.58 ▼29.0539.84 ▼12.28
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0239.62 ▲2.8635.16 ▼1.74
Add New Post /wp-admin/post-new.php1,517 ▼317.78 ▼5.34629.51 ▼27.5050.25 ▼15.58
Media Library /wp-admin/upload.php1,386 ▼24.24 ▼0.1794.57 ▼24.9240.76 ▼8.11
reCAPTCHA /wp-admin/options-general.php?page=google_recaptcha-options7862.0423.5527.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-google-recaptcha/simple-google-recaptcha.php
    • > /wp-content/plugins/wp-google-recaptcha/uninstall.php
    • > /wp-content/plugins/wp-google-recaptcha/inc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-google-recaptcha === )
  • Screenshots: These screenshots lack descriptions #3, #4 in wp-google-recaptcha/assets to your readme.txt
You can take inspiration from this readme.txt

wp-google-recaptcha/simple-google-recaptcha.php 92% from 13 tests

"Add Google re captcha in Wordpress Forms" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-google-recaptcha.php" instead of "simple-google-recaptcha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin137 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33110122
CSS1109
JavaScript1006

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.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png3.45KB3.27KB▼ 5.04%
assets/screenshot-4.png37.38KB9.15KB▼ 75.52%
assets/screenshot-1.png18.80KB6.00KB▼ 68.09%
assets/screenshot-2.png11.94KB5.55KB▼ 53.51%
assets/screenshot-3.png98.04KB28.96KB▼ 70.46%