68% formdesigner

Code Review | FormDesigner - online web form builder

WordPress plugin FormDesigner - online web form builder scored68%from 54 tests.

About plugin

  • Plugin page: formdesigner
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Mar 29, 2022
  • Number of updates: 28
  • Update frequency: every 93.1 days
  • Top authors: ishamshur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,871 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼35.55ms] Passed 4 tests

Analyzing server-side resources used by FormDesigner - online web form builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.88 ▼3.78
Dashboard /wp-admin3.06 ▼0.2925.97 ▼34.78
Posts /wp-admin/edit.php3.06 ▼0.3023.29 ▼22.32
Add New Post /wp-admin/post-new.php3.06 ▼2.8322.51 ▼73.74
Media Library /wp-admin/upload.php3.06 ▼0.1723.48 ▼11.34

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for FormDesigner - online web form builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.46 ▼0.221.74 ▲0.1042.52 ▲3.20
Dashboard /wp-admin2,221 ▲365.82 ▼0.0694.01 ▼9.5979.35 ▲39.02
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0234.29 ▼4.0832.83 ▼0.30
Add New Post /wp-admin/post-new.php1,527 ▼1223.12 ▲0.20706.67 ▲126.0150.34 ▼3.43
Media Library /wp-admin/upload.php1,403 ▲124.13 ▼0.09102.59 ▲5.5146.08 ▲3.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/formdesigner/views/code.php
    • > /wp-content/plugins/formdesigner/formdesigner.php
    • > /wp-content/plugins/formdesigner/views/redirect.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/formdesigner/views/popup.php:10
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/formdesigner/views/code.php on line 4
    • > PHP Notice
      Undefined variable: redirectUrl in wp-content/plugins/formdesigner/views/redirect.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/formdesigner/views/code.php on line 1
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/formdesigner/views/code.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === formdesigner === )
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

formdesigner/formdesigner.php Passed 13 tests

Analyzing the main PHP file in "FormDesigner - online web form builder" version 2.2.0
129 characters long description:
Multifunctional constructor of web forms, surveys, quizzes and calculators in real time. No special knowledge or skills required.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin804 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP55227384
JavaScript3290310
CSS25056
PO File1141446
SVG1018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods1970.37%
▷ Protected methods00.00%
▷ Private methods829.63%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/logo.png1.15KB0.19KB▼ 83.36%
src/menu_icon.png1.19KB0.25KB▼ 79.21%