84% addonify-recaptcha-for-edd

Code Review | Addonify - reCaptcha For EDD

WordPress plugin Addonify - reCaptcha For EDD scored84%from 54 tests.

About plugin

  • Plugin page: addonify-recaptch...
  • Plugin version: 1.0.12
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Aug 25, 2023
  • Number of updates: 13
  • Update frequency: every 73.5 days
  • Top authors: addonify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,565 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.07ms] Passed 4 tests

A check of server-side resources used by Addonify - reCaptcha For EDD
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.44 ▼6.59
Dashboard /wp-admin3.38 ▲0.0749.86 ▼5.37
Posts /wp-admin/edit.php3.49 ▲0.1353.39 ▲2.15
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.40 ▲5.96
Media Library /wp-admin/upload.php3.30 ▲0.0737.21 ▲1.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Addonify - reCaptcha For EDD
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.99 ▼0.3615.45 ▲13.1643.40 ▼5.98
Dashboard /wp-admin2,201 ▲215.57 ▼0.1185.37 ▼8.1140.59 ▲1.79
Posts /wp-admin/edit.php2,107 ▲42.02 ▼0.0040.58 ▲3.1035.84 ▲1.57
Add New Post /wp-admin/post-new.php1,532 ▲623.02 ▼0.42680.43 ▼12.8051.08 ▼1.49
Media Library /wp-admin/upload.php1,409 ▲154.29 ▲0.0895.76 ▼5.4045.30 ▼1.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely 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-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-recaptcha-for-edd/admin/class-addonify-recaptcha-for-edd-settings.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: spam, edd recaptcha, security, google recaptcha, login recaptcha...

addonify-recaptcha-for-edd/addonify-recaptcha-for-edd.php Passed 13 tests

"Addonify - reCaptcha For EDD" version 1.0.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
128 characters long description:
Addonify reCaptcha For EDD is a simple plugin that adds Google reCaptcha in Easy Digital Downloads login and registration forms.

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 plugin331 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11144411301
JavaScript191330

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2781.82%
▷ Protected methods00.00%
▷ Private methods618.18%
Functions3
▷ Named functions3100.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
No PNG files were detected