83% guten-forms-mailpoet

Code Review | Gutenberg Forms Add-on for MailPoet

WordPress plugin Gutenberg Forms Add-on for MailPoet scored83%from 54 tests.

About plugin

  • Plugin page: guten-forms-mailpoet
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: May 19, 2022
  • Number of updates: 8
  • Update frequency: every 89.4 days
  • Top authors: munirkamal (75%)Jack Kitterhing (25%)giucu91 (25%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.18ms] Passed 4 tests

Server-side resources used by Gutenberg Forms Add-on for MailPoet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.24 ▼1.18
Dashboard /wp-admin3.31 ▼0.0342.96 ▼14.77
Posts /wp-admin/edit.php3.36 ▲0.0147.00 ▼4.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.89 ▼15.83
Media Library /wp-admin/upload.php3.24 ▲0.0132.76 ▼5.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gutenberg Forms Add-on for MailPoet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.22 ▼0.011.78 ▲0.2738.38 ▼3.36
Dashboard /wp-admin2,195 ▲215.61 ▲0.0490.97 ▲4.2639.73 ▼1.36
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0140.55 ▼2.0234.23 ▼2.19
Add New Post /wp-admin/post-new.php1,535 ▲918.02 ▼5.10619.08 ▲27.3876.70 ▲22.58
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.1094.40 ▼1.7643.94 ▲3.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/guten-forms-mailpoet/init.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/guten-forms-mailpoet/api/api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/guten-forms-mailpoet/message.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/guten-forms-mailpoet/addon.php:3

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 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (WordPress Form Builder Plugin - Gutenberg Forms), #2 (Adding New Field), #3 (Rearrange Form Fields via Drag & Drop or Up & Down buttons.), #4 (Form Settings), #5 (Email Builder), #6 (Form Styles)
The official readme.txt might help

guten-forms-mailpoet/init.php 77% from 13 tests

The entry point to "Gutenberg Forms Add-on for MailPoet" version 2.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("guten-forms-mailpoet.php" instead of "init.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin303 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP413931198
JSON10063
Markdown125028
HTML13114

PHP code Passed 2 tests

This is a very shot 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.54
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity6.29
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected