89% buddyforms-woocommerce-form-elements

Code Review | BuddyForms Form Elements for WooCommerce

WordPress plugin BuddyForms Form Elements for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: buddyforms-woocom...
  • Plugin version: 1.5.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Dec 21, 2022
  • Number of updates: 249
  • Update frequency: every 11.8 days
  • Top authors: svenl77 (96.39%)gfirem (4.02%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /16,493 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
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼0.74ms] Passed 4 tests

This is a short check of server-side resources used by BuddyForms Form Elements for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4043.16 ▲6.36
Dashboard /wp-admin3.74 ▲0.4449.37 ▼0.75
Posts /wp-admin/edit.php3.79 ▲0.4442.07 ▼5.13
Add New Post /wp-admin/post-new.php6.26 ▲0.3785.01 ▼2.13
Media Library /wp-admin/upload.php3.60 ▲0.3739.25 ▲5.05
Install Plugins /wp-admin/plugins.php?page=bf_wc_fe-install-plugins3.6731.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BuddyForms Form Elements for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.32 ▲0.051.66 ▼0.3537.72 ▼0.55
Dashboard /wp-admin2,229 ▲495.63 ▲0.0288.53 ▼4.1539.90 ▲3.08
Posts /wp-admin/edit.php2,143 ▲432.02 ▲0.0237.23 ▼0.0135.63 ▼11.59
Add New Post /wp-admin/post-new.php1,556 ▲2123.20 ▲5.19594.95 ▼45.7857.57 ▼11.49
Media Library /wp-admin/upload.php1,439 ▲394.23 ▲0.1299.91 ▼5.9053.32 ▲6.61
Install Plugins /wp-admin/plugins.php?page=bf_wc_fe-install-plugins1,0022.0626.4430.57

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: frontend editing, taxonomy, user, profiles, custom post types...

buddyforms-woocommerce-form-elements/loader.php 77% from 13 tests

"BuddyForms Form Elements for WooCommerce" version 1.5.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddyforms-woocommerce-form-elements.php" instead of "loader.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.9" instead of "3.7.0")

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
There were no executable files found in this plugin11,916 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,4491,9934,842
JavaScript115583293,893
PHP133062701,955
CSS542691,206
JSON10020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity30.47
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods163
▷ Static methods2414.72%
▷ Public methods13784.05%
▷ Protected methods2314.11%
▷ Private methods31.84%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin