10% buddyforms

Code Review | Post Form - Registration Form - Profile Form for User Profiles - Frontend Content Forms for User Submissions (UGC)

WordPress plugin Post Form - Registration Form - Profile Form for User Profiles - Frontend Content Forms for User Submissions (UGC) scored10%from 54 tests.

About plugin

  • Plugin page: buddyforms
  • Plugin version: 2.8.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 853
  • Update frequency: every 3.2 days
  • Top authors: svenl77 (93.2%)gfirem (6.92%)

Code review

54 tests

User reviews

179 reviews

Install metrics

1,000+ active /189,526 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲6.97MB] [CPU: ▲50.01ms] 50% from 4 tests

A check of server-side resources used by Post Form - Registration Form - Profile Form for User Profiles - Frontend Content Forms for User Submissions (UGC)
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 10.79MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.97MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.42 ▲5.9589.65 ▲48.22
Dashboard /wp-admin10.62 ▲7.3199.08 ▲52.33
Posts /wp-admin/edit.php10.67 ▲7.32111.07 ▲66.59
Add New Post /wp-admin/post-new.php13.25 ▲7.36139.74 ▲46.50
Media Library /wp-admin/upload.php10.54 ▲7.3188.63 ▲52.97
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.7983.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 876 new files
Database: no new tables, 13 new options
New WordPress options
buddyforms_preview_page
db_upgraded
theysaidso_admin_options
fs_accounts
widget_recent-comments
buddyforms_first_path_after_install
fs_active_plugins
can_compress_scripts
buddyforms_gdpr
buddyforms_submissions_page
...

Browser metrics Passed 4 tests

Post Form - Registration Form - Profile Form for User Profiles - Frontend Content Forms for User Submissions (UGC): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10414.71 ▲0.371.89 ▲0.1533.71 ▼4.39
Dashboard /wp-admin2,243 ▲665.82 ▲0.1697.72 ▼3.5646.04 ▼1.69
Posts /wp-admin/edit.php2,152 ▲552.06 ▲0.0642.12 ▲2.1838.17 ▲2.84
Add New Post /wp-admin/post-new.php1,584 ▲4926.12 ▲0.94724.98 ▲41.1230.18 ▼38.98
Media Library /wp-admin/upload.php1,451 ▲574.23 ▼0.0299.11 ▲1.3943.79 ▼1.63
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1191.7427.7831.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/buddyforms/includes/resources/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-posts
    • buddyforms_gdpr
    • fs_accounts
    • buddyforms_first_path_after_install
    • widget_recent-comments
    • db_upgraded
    • fs_active_plugins
    • theysaidso_admin_options
    • ...

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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 51× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'tk\\GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/promises/src/Coroutine.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/psr7/src/CachingStream.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/psr7/src/LimitStream.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'tk\\GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'tk\\GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'tk\\GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/psr/http-client/src/NetworkExceptionInterface.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'tk\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/buddyforms/vendor-scope/buddyforms/vendor/guzzlehttp/psr7/src/FnStream.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Embed Forms - The easy way to embed forms), #2 (List Submissions - Display the user Submissions), #3 (Embed Navigation - Link to forms and Submissions), #4 (Login/ Logout Form - Add Loggin Forms and define a custom redirect after login)
You can take inspiration from this readme.txt

buddyforms/BuddyForms.php 85% from 13 tests

The main file in "Post Form - Registration Form - Profile Form for User Profiles - Frontend Content Forms for User Submissions (UGC)" v. 2.8.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddyforms.php" instead of "BuddyForms.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis 97% from 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 detected99,822 lines of code in 699 files:
LanguageFilesBlank linesComment linesLines of code
PHP37211,71921,73154,576
JavaScript2655,1313,32626,275
PO File65,3986,21812,359
CSS467261925,635
JSON200451
Markdown1680214
HTML1152152
SVG200111
XML20034
make1409
YAML1206

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity28.86
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces12
Interfaces22
Traits3
Classes209
▷ Abstract classes83.83%
▷ Concrete classes20196.17%
▷ Final classes209.95%
Methods2,319
▷ Static methods36815.87%
▷ Public methods1,77876.67%
▷ Protected methods401.72%
▷ Private methods50121.60%
Functions551
▷ Named functions45983.30%
▷ Anonymous functions9216.70%
Constants223
▷ Global constants10647.53%
▷ Class constants11752.47%
▷ Public constants117100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.67MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/welcome-screen/PJRz0Fc.png0.51KB0.59KB0.00%
assets/images/multimedia.png6.05KB3.17KB▼ 47.68%
assets/admin/img/icon-buddyformsc-16-active.png0.47KB0.35KB▼ 26.60%
assets/admin/img/themekraft-logo-s.png3.19KB1.16KB▼ 63.54%
includes/resources/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%