68% formcraft-form-builder

Code Review | FormCraft - Contact Form Builder for WordPress

WordPress plugin FormCraft - Contact Form Builder for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: formcraft-form-bu...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2015
  • Latest release: Aug 5, 2023
  • Number of updates: 42
  • Update frequency: every 73.2 days
  • Top authors: nish@ncrafts.net (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

4,000+ active /99,573 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.03MB] [CPU: ▼15.94ms] Passed 4 tests

Analyzing server-side resources used by FormCraft - Contact Form Builder for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2350.09 ▲12.66
Dashboard /wp-admin3.27 ▼0.0727.49 ▼31.25
Posts /wp-admin/edit.php3.41 ▲0.0634.80 ▼11.60
Add New Post /wp-admin/post-new.php5.65 ▼0.2373.51 ▼13.05
Media Library /wp-admin/upload.php3.36 ▲0.1325.26 ▼7.87

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 136 new files
Database: 3 new tables, 6 new options
New tables
wp_formcraft_b_forms
wp_formcraft_b_views
wp_formcraft_b_submissions
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for FormCraft - Contact Form Builder for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.25 ▼1.332.53 ▲0.8853.76 ▲14.29
Dashboard /wp-admin2,220 ▲285.88 ▲0.9198.21 ▼12.9336.81 ▼6.06
Posts /wp-admin/edit.php2,103 ▲142.00 ▼0.0540.50 ▲4.2736.30 ▲2.79
Add New Post /wp-admin/post-new.php1,540 ▼523.45 ▲0.70644.50 ▲10.8153.22 ▲4.57
Media Library /wp-admin/upload.php1,405 ▲174.22 ▲0.0594.69 ▼6.0741.77 ▼0.90

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
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_formcraft_b_views
    • wp_formcraft_b_submissions
    • wp_formcraft_b_forms
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/formcraft-form-builder/views/builder.php
    • > /wp-content/plugins/formcraft-form-builder/views/dashboard.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/formcraft-form-builder/formcraft-main.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/formcraft-form-builder/formcraft-main.php:42
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/formcraft-form-builder/formcraft-main.php on line 18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/formcraft-form-builder/formcraft-main.php on line 17

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

formcraft-form-builder/formcraft-main.php 85% from 13 tests

The main PHP file in "FormCraft - Contact Form Builder for WordPress" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("formcraft-form-builder.php" instead of "formcraft-main.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin11,467 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript895651,0374,881
LESS54633,196
CSS15319571,713
PHP4102611,627
SVG20050

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions35100.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
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/plus.png1.06KB0.20KB▼ 80.67%
assets/images/logic.png103.77KB39.44KB▼ 61.99%