84% embed-form

Code Review | Jotform Online Forms - Drag & Drop Form Builder, Securely Embed Contact Forms

WordPress plugin Jotform Online Forms - Drag & Drop Form Builder, Securely Embed Contact Forms scored84%from 54 tests.

About plugin

  • Plugin page: embed-form
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jan 5, 2023
  • Number of updates: 60
  • Update frequency: every 58.3 days
  • Top authors: jotform (80%)paul_simpson (13.33%)eeertekin (10%)

Code review

54 tests

User reviews

27 reviews

Install metrics

20,000+ active /184,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.94ms] Passed 4 tests

Analyzing server-side resources used by Jotform Online Forms - Drag & Drop Form Builder, Securely Embed Contact Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.58 ▼5.07
Dashboard /wp-admin3.32 ▲0.0247.23 ▼2.95
Posts /wp-admin/edit.php3.37 ▲0.0150.75 ▲5.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.58 ▼2.80
Media Library /wp-admin/upload.php3.24 ▲0.0138.98 ▲3.07

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Jotform Online Forms - Drag & Drop Form Builder, Securely Embed Contact Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.39 ▼1.161.70 ▼0.2841.00 ▼3.50
Dashboard /wp-admin2,209 ▲184.87 ▼1.04111.53 ▲6.5138.75 ▼0.92
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0840.18 ▲1.9333.38 ▼2.08
Add New Post /wp-admin/post-new.php1,539 ▲2018.33 ▼4.99663.80 ▲47.3551.50 ▲2.99
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0997.71 ▼6.9642.45 ▼2.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-form/jotform-wp-embed.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "N/A"
You can take inspiration from this readme.txt

embed-form/jotform-wp-embed.php 92% from 13 tests

The principal PHP file in "Jotform Online Forms - Drag & Drop Form Builder, Securely Embed Contact Forms" v. 1.3.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("embed-form.php" instead of "jotform-wp-embed.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
Success! There were no dangerous files found in this plugin208 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21219162
PHP1112246

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
jotform.png2.73KB1.61KB▼ 41.20%