84% engagebay-add-on-for-contact-form-7

Code Review | EngageBay Add-on For Contact Form 7

WordPress plugin EngageBay Add-on For Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: engagebay-add-on-...
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: Aug 20, 2023
  • Number of updates: 16
  • Update frequency: every 90.3 days
  • Top authors: engagebay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,070 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.08ms] Passed 4 tests

An overview of server-side resources used by EngageBay Add-on For Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.35 ▼2.81
Dashboard /wp-admin3.31 ▲0.0042.79 ▼5.00
Posts /wp-admin/edit.php3.36 ▲0.0044.25 ▲0.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.30 ▼9.44
Media Library /wp-admin/upload.php3.23 ▲0.0034.17 ▲1.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 192 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for EngageBay Add-on For Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.23 ▼1.521.95 ▼0.0239.85 ▼7.10
Dashboard /wp-admin2,206 ▲186.06 ▲1.1896.32 ▼21.2640.01 ▼3.71
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0237.70 ▲2.8834.80 ▼0.72
Add New Post /wp-admin/post-new.php1,542 ▲2023.07 ▼0.20603.49 ▼21.9351.83 ▲1.30
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0593.08 ▼9.4641.21 ▼2.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 62× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Trait 'League\\OAuth2\\Client\\Tool\\RequiredParameterTrait' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/league/oauth2-client/src/Grant/AbstractGrant.php on line 31
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/league/oauth2-client/src/Grant/RefreshToken.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/engagebay-add-on-for-contact-form-7/engagebay-cf7-forms.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/engagebay-add-on-for-contact-form-7/vendor/guzzlehttp/promises/src/FulfilledPromise.php:10

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 93% 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:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
You can take inspiration from this readme.txt

engagebay-add-on-for-contact-form-7/engagebay-cf7-forms.php 92% from 13 tests

"EngageBay Add-on For Contact Form 7" version 1.8.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("engagebay-add-on-for-contact-form-7.php" instead of "engagebay-cf7-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected19,049 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1372,4076,40413,756
Markdown181,29503,775
JSON1210981
CSS1214492
XML10019
Dockerfile18010
make1409
Bourne Shell1203
JavaScript1003
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions214
▷ Named functions12558.41%
▷ Anonymous functions8941.59%
Constants107
▷ Global constants4642.99%
▷ Class constants6157.01%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/engagebay.png13.12KB4.67KB▼ 64.38%