10% fabulous-form-maker

Code Review | Fabulous Form Maker

WordPress plugin Fabulous Form Maker scored 10% from 54 tests.

About plugin

  • Plugin page: fabulous-form-maker
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 5.9.2
  • First release: Aug 10, 2013
  • Latest release: Jul 25, 2015
  • Number of updates: 36
  • Update frequency: every 19.9 days
  • Top authors: EllyTronic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 7,805 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/fabulous-form-maker/FM/WordPress/Adapter.php+345
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.04MB] [CPU: ▼294.71ms] Passed 4 tests

Analyzing server-side resources used by Fabulous Form Maker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1354.03 ▲7.14
Dashboard /wp-admin3.47 ▲0.0733.14 ▲0.04
Posts /wp-admin/edit.php3.70 ▲0.0639.30 ▲2.66
Add New Post /wp-admin/post-new.php6.94 ▼0.0389.84 ▼1,179.47
Media Library /wp-admin/upload.php3.35 ▲0.0622.78 ▼2.07

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 39 new files
Database: 2 new tables, 1 new option
New tables
wp_etm_contact
wp_etm_contact_settings
New WordPress options
etm_contact_db_version

Browser metrics Passed 4 tests

Fabulous Form Maker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲6216.17 ▲0.536.59 ▲0.412.70 ▲0.16
Dashboard /wp-admin2,905 ▲446.14 ▲0.06121.89 ▼11.08157.89 ▼0.91
Posts /wp-admin/edit.php2,692 ▲13.24 ▲0.0163.68 ▼5.52144.51 ▼3.97
Add New Post /wp-admin/post-new.php1,674 ▼3717.26 ▼3.46382.68 ▼49.12161.09 ▲3.77
Media Library /wp-admin/upload.php1,718 ▲235.50 ▼0.03141.45 ▲5.68184.57 ▲0.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_etm_contact_settings
    • wp_etm_contact
  • Zombie WordPress options detected upon uninstall: 1 option
    • etm_contact_db_version

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FM\\I_Field' not found in wp-content/plugins/fabulous-form-maker/FM/Field.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function getAdminName() on null in wp-content/plugins/fabulous-form-maker/FM/templates/editor-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function getFields() on null in wp-content/plugins/fabulous-form-maker/FM/templates/editor-workspace.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fabulous-form-maker/FM/FrontEndTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'FM\\I_FrontEnd' not found in wp-content/plugins/fabulous-form-maker/FM/FrontEnd.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'FM\\I_Adapter' not found in wp-content/plugins/fabulous-form-maker/FM/WordPress/Adapter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fabulous-form-maker/FM/FieldTest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FM\\WordPress\\add_action() in wp-content/plugins/fabulous-form-maker/FM/WordPress/support.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FM\\Editor' not found in wp-content/plugins/fabulous-form-maker/FM/templates/editor.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'FM\\I_Editor' not found in wp-content/plugins/fabulous-form-maker/FM/Editor.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 to be fixed:
  • Screenshots: Add images for these screenshots: #1 (After entering necessary information in Settings, user can create the form by choosing fields from the drop down list.), #2 (On selection of Single-Line Text Box option, user can add Text to print before this single line text box: making this field as ‘Required’ (a check box), Finish this element and add to form or Cancel adding this element.), #3 (User selects Selection Box option from the drop down list. User can add entry in Text to print before this drop down select box, make a field Required or not required, add options to the Next select box option, Your Select Box So Far displays the options, Finish this element and add to form or Cancel adding this element.), #4 (User selects Large Text Box option from drop down list.), #5 (User selects Password Text Box option from drop down list.), #6 (User selects Radio Box option from drop down list. On selection of Radio Box option, user can add Text to print before this list of choices:, make this field as Required or not Required, Label for this choice, Finish this element and add to form or Cancel adding this element.), #7 (User selects Check Boxes option from drop down list. On selection of Check Boxes option, user can add Text to print before this list of choices:, make this field as Required or not Required, Label for this choice, Finish this element and add to form or Cancel adding this element.), #8 (View of form after click on Save Form.), #9 (View of form after click on Save Form (continued).), #10 (The front-end form.), #11 (The front-end form submission result.), #12 (The email the form admin receives.)
You can take inspiration from this readme.txt

fabulous-form-maker/FabulousFormMaker.php 85% from 13 tests

The principal PHP file in "Fabulous Form Maker" v. 2.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fabulous-form-maker.php" instead of "FabulousFormMaker.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,375 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP15222513705
JavaScript1117116365
Markdown1370156
Java2156773
XML20062
INI10011
JSON1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces4
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods62
▷ Static methods1016.13%
▷ Public methods6198.39%
▷ Protected methods00.00%
▷ Private methods11.61%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.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
12 PNG files occupy 0.46MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
FM/Screenshots/Step9-YourFormSoFar2.png33.90KB13.06KB▼ 61.47%
FM/Screenshots/Step6-RadioBox.png54.23KB20.86KB▼ 61.53%
FM/Screenshots/Email.png45.30KB14.99KB▼ 66.91%
FM/Screenshots/Step4-LargeTextBox.png39.44KB15.41KB▼ 60.92%
FM/Screenshots/Step3-SelectionBox.png48.99KB18.39KB▼ 62.46%