78% engagebay-forms

Code Review | EngageBay Forms - Simple and Powerful Forms to Capture and Nurture Leads

WordPress plugin EngageBay Forms - Simple and Powerful Forms to Capture and Nurture Leads scored78%from 54 tests.

About plugin

  • Plugin page: engagebay-forms
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2018
  • Latest release: Aug 20, 2023
  • Number of updates: 24
  • Update frequency: every 75.9 days
  • Top authors: engagebay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,496 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.32ms] Passed 4 tests

Server-side resources used by EngageBay Forms - Simple and Powerful Forms to Capture and Nurture Leads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.04 ▼7.63
Dashboard /wp-admin3.32 ▲0.0251.51 ▼2.42
Posts /wp-admin/edit.php3.38 ▲0.0250.74 ▼0.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.79 ▼6.75
Media Library /wp-admin/upload.php3.24 ▲0.0235.07 ▲1.59

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 211 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by EngageBay Forms - Simple and Powerful Forms to Capture and Nurture Leads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,190 ▲44414.85 ▲0.271.71 ▼0.2031.07 ▼15.98
Dashboard /wp-admin2,581 ▲3934.90 ▼0.98107.84 ▼0.0779.17 ▲40.84
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0637.21 ▼1.7434.35 ▼4.71
Add New Post /wp-admin/post-new.php1,524 ▼1017.49 ▼5.56701.19 ▲22.0055.39 ▲0.86
Media Library /wp-admin/upload.php1,396 ▲144.15 ▼0.02101.11 ▼0.7075.30 ▲29.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/engagebay-forms/index.php
  • 58× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/engagebay-forms/vendor/league/oauth2-client/src/Grant/AuthorizationCode.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/engagebay-forms/vendor/guzzlehttp/promises/src/EachPromise.php:8

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

engagebay-forms/index.php 85% from 13 tests

The primary PHP file in "EngageBay Forms - Simple and Powerful Forms to Capture and Nurture Leads" version 1.9.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 181 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("engagebay-forms.php" instead of "index.php")

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
No dangerous file extensions were detected20,323 lines of code in 187 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332,3636,41814,188
Markdown181,29503,775
JSON1210981
CSS2405650
SVG13211558
JavaScript5233130
XML10019
Dockerfile18010
make1409
Bourne Shell1203

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.04
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces18
Interfaces19
Traits9
Classes83
▷ Abstract classes22.41%
▷ Concrete classes8197.59%
▷ Final classes1316.05%
Methods827
▷ Static methods12715.36%
▷ Public methods63877.15%
▷ Protected methods587.01%
▷ Private methods13115.84%
Functions228
▷ Named functions13960.96%
▷ Anonymous functions8939.04%
Constants105
▷ Global constants4441.90%
▷ Class constants6158.10%
▷ Public constants61100.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
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/engagebay.png13.12KB4.67KB▼ 64.38%
images/icon_2.png1.67KB0.88KB▼ 47.05%
images/edit.png0.42KB0.29KB▼ 31.24%
images/preview-n.png2.21KB1.84KB▼ 17.02%
images/refresh-icon.png4.46KB2.66KB▼ 40.53%