89% mailpoet-gravity-forms-add-on

Code Review | MailPoet Gravity Forms Add-on

WordPress plugin MailPoet Gravity Forms Add-on scored89%from 54 tests.

About plugin

  • Plugin page: mailpoet-gravity-...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Aug 19, 2014
  • Number of updates: 19
  • Update frequency: every 38.1 days
  • Top authors: sebd86 (78.95%)wysija (26.32%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /11,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by MailPoet Gravity Forms Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.96 ▼2.82
Dashboard /wp-admin3.34 ▼0.0044.64 ▼12.59
Posts /wp-admin/edit.php3.46 ▲0.1043.91 ▼5.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.23 ▼9.25
Media Library /wp-admin/upload.php3.27 ▲0.0433.50 ▼3.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for MailPoet Gravity Forms Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3214.24 ▲0.031.63 ▼0.2939.70 ▼3.32
Dashboard /wp-admin2,198 ▲305.58 ▲0.0285.41 ▼2.1639.27 ▼3.59
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0235.72 ▼2.2131.73 ▲0.19
Add New Post /wp-admin/post-new.php1,531 ▲523.17 ▼0.01598.46 ▼83.0956.43 ▼10.53
Media Library /wp-admin/upload.php1,400 ▼34.30 ▲0.12100.24 ▼16.6941.91 ▼6.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (MailPoet settings under "Gravity Forms -> Settings"), #2 (Form with MailPoet field applied), #3 (Form on post/page)
You can look at the official readme.txt

mailpoet-gravity-forms-add-on/mailpoet-gravity-forms-addon.php 85% from 13 tests

The primary PHP file in "MailPoet Gravity Forms Add-on" version 2.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("mailpoet-gravity-forms-add-on.php" instead of "mailpoet-gravity-forms-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected966 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12217457692
PO File28391271
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.25
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods31
▷ Static methods516.13%
▷ Public methods2787.10%
▷ Protected methods00.00%
▷ Private methods412.90%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants1280.00%
▷ Class constants320.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.68KB14.58KB▼ 43.24%
screenshot-2.png14.93KB8.93KB▼ 40.19%
screenshot-3.png7.90KB5.60KB▼ 29.15%