72% formaloo-form-builder

Code Review | Formaloo Form Maker & Customer Analytics for WordPress & WooCommerce

WordPress plugin Formaloo Form Maker & Customer Analytics for WordPress & WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: formaloo-form-bui...
  • Plugin version: 2.1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Jun 24, 2023
  • Number of updates: 85
  • Update frequency: every 13.6 days
  • Top authors: formaloo (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /8,910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.62MB] [CPU: ▲172.94ms] Passed 4 tests

Server-side resources used by Formaloo Form Maker & Customer Analytics for WordPress & WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5945.89 ▲2.10
Dashboard /wp-admin3.94 ▲0.63349.39 ▲294.01
Posts /wp-admin/edit.php3.99 ▲0.63365.78 ▲314.50
Add New Post /wp-admin/post-new.php6.54 ▲0.65295.41 ▲196.31
Media Library /wp-admin/upload.php3.86 ▲0.63235.83 ▲199.34
My Forms /wp-admin/admin.php?page=formaloo3.81337.83
Feedback Widget /wp-admin/admin.php?page=formaloo-feedback-widget-page3.82240.99
/wp-admin/admin.php?page=formaloo-results-page3.81235.89
Settings /wp-admin/admin.php?page=formaloo-settings-page3.83251.63
Templates /wp-admin/admin.php?page=formaloo-templates-page3.82247.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Formaloo Form Maker & Customer Analytics for WordPress & WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12914.40 ▲0.041.58 ▼0.4141.62 ▼1.61
Dashboard /wp-admin2,270 ▲935.83 ▲0.1690.50 ▼10.9139.59 ▼2.87
Posts /wp-admin/edit.php2,172 ▲722.38 ▲0.3836.71 ▲1.0434.77 ▼1.65
Add New Post /wp-admin/post-new.php6,432 ▲4,90622.97 ▼0.09932.04 ▲259.5038.93 ▼17.27
Media Library /wp-admin/upload.php1,497 ▲944.40 ▲0.1590.38 ▼25.7739.01 ▼10.69
My Forms /wp-admin/admin.php?page=formaloo1,1332.1031.5633.74
Feedback Widget /wp-admin/admin.php?page=formaloo-feedback-widget-page1,2572.1431.7429.06
/wp-admin/admin.php?page=formaloo-results-page1,0041.9929.4824.31
Settings /wp-admin/admin.php?page=formaloo-settings-page9781.9629.8632.64
Templates /wp-admin/admin.php?page=formaloo-templates-page1,3482.3338.3633.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Notice in wp-content/plugins/formaloo-form-builder/inc/pages/resultsPage.php+8
    Undefined index: api_key
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Notice in wp-content/plugins/formaloo-form-builder/inc/pages/resultsPage.php+7
    Undefined index: api_token
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Notice in wp-content/plugins/formaloo-form-builder/inc/pages/formResultsPage.php+82
    Undefined index: results_slug
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Notice in wp-content/plugins/formaloo-form-builder/inc/pages/resultsPage.php+9
    Undefined index: api_secret
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Notice in wp-content/plugins/formaloo-form-builder/inc/tables/resultsTable.php+59
    Trying to access array offset on value of type null
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Warning in wp-content/plugins/formaloo-form-builder/inc/tables/resultsTable.php+62
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=formaloo-results-page
    • > Warning in wp-content/plugins/formaloo-form-builder/inc/tables/resultsTable.php+147
    Invalid argument supplied for foreach()

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
Please take a closer look at the following
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/pages/formResultsPage.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/pages/formsListPage.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/pages/resultsPage.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/auth/refreshAuthToken.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/notices/adminNotice.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/formaloo-form-builder/blocks/formaloo-block.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/formaloo-form-builder/classic-editor.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/formaloo-form-builder/classicEditor.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/formaloo-form-builder/formaloo.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Formaloo_Main_Class' not found in wp-content/plugins/formaloo-form-builder/inc/pages/feedbackWidgetPage.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=formaloo-templates-page
    • > Network (severe)
    wp-admin/null - Failed to load resource: the server responded with a status of 404 (Not Found)

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 your attention:
  • Tags: Please delete some tags, you are using 40 tag instead of maximum 10
You can look at the official readme.txt

formaloo-form-builder/formaloo.php 85% from 13 tests

"Formaloo Form Maker & Customer Analytics for WordPress & WooCommerce" version 2.1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("formaloo-form-builder.php" instead of "formaloo.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "3.5.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
Success! There were no dangerous files found in this plugin6,836 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP289577004,167
PO File56101,9751,417
JavaScript455102635
CSS431506
SVG602111

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.50
▷ Minimum class complexity3.00
▷ Maximum class complexity55.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods119
▷ Static methods1210.08%
▷ Public methods9781.51%
▷ Protected methods54.20%
▷ Private methods1714.29%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.16MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_placeholder.png9.57KB5.36KB▼ 44.02%
assets/images/Formaloo_Logo.png7.85KB4.71KB▼ 40.01%
assets/images/widget_icons/fillHeart.png15.90KB6.36KB▼ 60.01%
assets/images/woo-commerce-cashback.png36.50KB12.89KB▼ 64.67%
assets/images/feedback_widget.png40.32KB40.38KB0.00%