84% affiliates-manager-google-recaptcha-integration

Code Review | Affiliates Manager Google reCAPTCHA Integration

WordPress plugin Affiliates Manager Google reCAPTCHA Integration scored84%from 54 tests.

About plugin

  • Plugin page: affiliates-manage...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 21, 2015
  • Latest release: Aug 20, 2022
  • Number of updates: 14
  • Update frequency: every 195.6 days
  • Top authors: affmngr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /8,831 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.01MB] [CPU: ▼4.81ms] Passed 4 tests

A check of server-side resources used by Affiliates Manager Google reCAPTCHA Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.60 ▼3.18
Dashboard /wp-admin3.31 ▲0.0144.78 ▼9.04
Posts /wp-admin/edit.php3.36 ▲0.0146.79 ▲1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.75 ▼8.67
Media Library /wp-admin/upload.php3.23 ▲0.0138.28 ▲4.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliates Manager Google reCAPTCHA Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.20 ▼1.421.69 ▲0.0739.77 ▲2.16
Dashboard /wp-admin2,208 ▲175.80 ▼0.1099.96 ▼2.1140.32 ▼0.03
Posts /wp-admin/edit.php2,096 ▲102.06 ▲0.0439.62 ▲2.2637.45 ▲4.50
Add New Post /wp-admin/post-new.php1,519 ▼017.68 ▼5.86648.67 ▼40.8765.67 ▲9.73
Media Library /wp-admin/upload.php1,390 ▲24.31 ▲0.12110.39 ▲6.1647.28 ▲3.64

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/affiliates-manager-google-recaptcha-integration/lib/ReCaptcha/RequestMethod/SocketPost.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/affiliates-manager-google-recaptcha-integration/lib/ReCaptcha/RequestMethod/Post.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/affiliates-manager-google-recaptcha-integration/lib/ReCaptcha/RequestMethod/CurlPost.php:38

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: affiliates manager, recaptcha, affiliate, captcha, affiliates...

affiliates-manager-google-recaptcha-integration/affmgr-recaptcha-addon.php 85% from 13 tests

The principal PHP file in "Affiliates Manager Google reCAPTCHA Integration" v. 1.0.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "3.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("affiliates-manager-google-recaptcha-integration.php" instead of "affmgr-recaptcha-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected524 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12149615524

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.90
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods47
▷ Static methods12.13%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin