73% official-mailerlite-sign-up-forms

Code Review | MailerLite - Signup forms (official)

WordPress plugin MailerLite - Signup forms (official) scored 73% from 54 tests.

About plugin

  • Plugin page: official-mailerli...
  • Plugin version: 1.6.13
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 3, 2014
  • Latest release: Sep 21, 2023
  • Number of updates: 213
  • Update frequency: every 15.7 days
  • Top authors: mailerlite (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

70,000+ active / 1,251,644 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.25ms] Passed 4 tests

This is a short check of server-side resources used by MailerLite - Signup forms (official)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.81 ▼6.64
Dashboard /wp-admin3.42 ▲0.1245.60 ▼4.51
Posts /wp-admin/edit.php3.53 ▲0.1850.41 ▲3.02
Add New Post /wp-admin/post-new.php6.00 ▲0.1293.78 ▼8.88
Media Library /wp-admin/upload.php3.34 ▲0.1238.28 ▲3.17
Status /wp-admin/admin.php?page=mailerlite_status3.3733.70
Settings /wp-admin/admin.php?page=mailerlite_settings3.3835.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 98 new files
Database: 1 new table, 7 new options
New tables
wp_mailerlite_forms
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_mailerlite_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for MailerLite - Signup forms (official)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.28 ▼1.103.75 ▲1.6839.60 ▼3.77
Dashboard /wp-admin2,235 ▲435.03 ▲0.1099.61 ▼9.3880.01 ▲39.83
Posts /wp-admin/edit.php2,121 ▲351.97 ▼0.0639.09 ▼0.5935.81 ▲0.37
Add New Post /wp-admin/post-new.php6,610 ▲5,06829.66 ▲11.33866.56 ▲239.5837.71 ▼16.05
Media Library /wp-admin/upload.php1,417 ▲324.21 ▼0.0597.18 ▼1.8968.42 ▲24.18
Status /wp-admin/admin.php?page=mailerlite_status9632.0326.0025.94
Settings /wp-admin/admin.php?page=mailerlite_settings8712.0125.2032.86

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mailerlite_forms
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_mailerlite_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MailerLiteForms\\plugin_dir_path() in wp-content/plugins/official-mailerlite-sign-up-forms/mailerlite.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/official-mailerlite-sign-up-forms/src/Modules/Widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg), #3 (screenshot-3.jpg), #4 (screenshot-4.jpg), #5 (screenshot-5.jpg), #6 (screenshot-6.jpg)
The official readme.txt might help

official-mailerlite-sign-up-forms/mailerlite.php 85% from 13 tests

The main PHP file in "MailerLite - Signup forms (official)" ver. 1.6.13 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("official-mailerlite-sign-up-forms.php" instead of "mailerlite.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin5,609 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP418759383,392
PO File44138501,037
JavaScript34491231,034
CSS2351141
SVG1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.69
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes39
▷ Abstract classes12.56%
▷ Concrete classes3897.44%
▷ Final classes00.00%
Methods147
▷ Static methods4127.89%
▷ Public methods11980.95%
▷ Protected methods00.00%
▷ Private methods2819.05%
Functions12
▷ Named functions00.00%
▷ Anonymous functions12100.00%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/icon.png2.11KB0.17KB▼ 92.07%
assets/image/shortcode.png2.93KB0.35KB▼ 88.17%
assets/image/custom_form.png12.23KB3.12KB▼ 74.53%
assets/image/mailerlite_form.png12.59KB3.34KB▼ 73.44%