77% freshworks-forms

Code Review | Freshworks Forms

WordPress plugin Freshworks Forms scored77%from 54 tests.

About plugin

  • Plugin page: freshworks-forms
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.1-5.8.1
  • WordPress version: 6.3.1
  • First release: May 5, 2022
  • Latest release: May 5, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: joekurian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.22ms] Passed 4 tests

This is a short check of server-side resources used by Freshworks Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.85 ▼3.88
Dashboard /wp-admin3.39 ▲0.0949.74 ▼3.20
Posts /wp-admin/edit.php3.50 ▲0.1553.05 ▲0.10
Add New Post /wp-admin/post-new.php6.02 ▲0.1393.77 ▼5.90
Media Library /wp-admin/upload.php3.31 ▲0.0839.04 ▲0.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Freshworks Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲8519.87 ▲5.871.91 ▲0.0839.74 ▼5.11
Dashboard /wp-admin2,243 ▲699.79 ▲4.27278.73 ▲190.5444.30 ▲3.49
Posts /wp-admin/edit.php2,156 ▲537.40 ▲5.39212.57 ▲172.7737.13 ▲2.25
Add New Post /wp-admin/post-new.php6,241 ▲4,71522.67 ▼0.751,114.95 ▲491.5640.79 ▼18.70
Media Library /wp-admin/upload.php1,441 ▲419.34 ▲5.17266.05 ▲161.3445.46 ▼0.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/freshworks-forms/uninstall.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/freshworks-forms/classes/class-create-settings-routes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/freshworks-forms/classes/class-create-admin-menu.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Drag & Drop Online Form Builder), #2 (Adding new template), #3 (Form Preview), #4 (Form Settings), #5 (Applying shotcode)
  • Tags: You are using too many tags: 32 tag instead of maximum 10
You can take inspiration from this readme.txt

freshworks-forms/fw-forms.php 85% from 13 tests

The main PHP file in "Freshworks Forms" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("freshworks-forms.php" instead of "fw-forms.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected631 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP55931488
HTML35161
Markdown111027
JavaScript3612822
JSON10017
CSS42215
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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