94% advanced-custom-fields-recaptcha-field

Code Review | Advanced Custom Fields: reCAPTCHA Field

WordPress plugin Advanced Custom Fields: reCAPTCHA Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 5.9.2
  • First release: Jul 9, 2015
  • Latest release: Jan 12, 2019
  • Number of updates: 53
  • Update frequency: every 24.2 days
  • Top authors: irvinlim (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active / 12,400 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼293.74ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields: reCAPTCHA Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0157.64 ▲3.37
Dashboard /wp-admin3.45 ▲0.0134.01 ▼1.94
Posts /wp-admin/edit.php3.68 ▲0.0139.66 ▼2.33
Add New Post /wp-admin/post-new.php6.92 ▼0.0892.67 ▼1,172.39
Media Library /wp-admin/upload.php3.33 ▲0.0125.93 ▲1.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Fields: reCAPTCHA Field: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5116.21 ▲0.585.97 ▼0.842.64 ▲0.65
Dashboard /wp-admin2,892 ▲386.11 ▼0.04118.12 ▼17.46154.22 ▼12.31
Posts /wp-admin/edit.php2,688 ▼63.23 ▼0.0163.05 ▼5.47139.97 ▼9.56
Add New Post /wp-admin/post-new.php1,692 ▲3120.74 ▲4.15443.27 ▲23.11165.34 ▲10.76
Media Library /wp-admin/upload.php1,701 ▲35.55 ▲0.04140.74 ▲3.34186.35 ▼2.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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
Even though no errors were found, this is by no means 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 fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-custom-fields-recaptcha-field/lib/ReCaptcha/RequestMethod/Curl.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-custom-fields-recaptcha-field/lib/ReCaptcha/RequestMethod/SocketPost.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-recaptcha-field/includes/settings-page.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/advanced-custom-fields-recaptcha-field/acf-recaptcha.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-custom-fields-recaptcha-field/includes/classes/WPRemoteRequestMethod.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-recaptcha-field/acf-recaptcha-v5.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-custom-fields-recaptcha-field/includes/script-loader.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-custom-fields-recaptcha-field/lib/ReCaptcha/RequestMethod/Post.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: captcha, acf, recaptcha, field, frontend...

advanced-custom-fields-recaptcha-field/acf-recaptcha.php 85% from 13 tests

"Advanced Custom Fields: reCAPTCHA Field" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-custom-fields-recaptcha-field.php" instead of "acf-recaptcha.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin826 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.70
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
▷ Static methods13.12%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1593.75%
▷ Anonymous functions16.25%
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin