100% newsletter-form-gutenberg-block-mailchimp

Code Review | Newsletter Form Block for Mailchimp

WordPress plugin Newsletter Form Block for Mailchimp scored 100% from 54 tests.

About plugin

  • Plugin page: newsletter-form-g...
  • Plugin version: 1.02
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.8.1
  • First release: Nov 23, 2018
  • Latest release: Jul 9, 2021
  • Number of updates: 19
  • Update frequency: every 50.5 days
  • Top authors: fullworks (52.63%)WebFactory (52.63%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 727 total downloads

Benchmarks

Plugin footprint Passed 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.11MB] [CPU: ▼141.86ms] Passed 4 tests

Server-side resources used by Newsletter Form Block for Mailchimp
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2153.43 ▲27.53
Dashboard /wp-admin3.17 ▲0.1150.94 ▲10.58
Posts /wp-admin/edit.php3.28 ▲0.1744.37 ▼1.34
Add New Post /wp-admin/post-new.php5.52 ▲0.0898.38 ▼580.25
Media Library /wp-admin/upload.php3.11 ▲0.1038.83 ▲3.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Newsletter Form Block for Mailchimp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲21716.62 ▲1.1011.96 ▲1.4850.91 ▼7.83
Dashboard /wp-admin2,973 ▲395.90 ▼0.05139.77 ▼6.11131.42 ▲11.02
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0067.87 ▼4.9389.20 ▼12.50
Add New Post /wp-admin/post-new.php1,696 ▲19618.86 ▲0.23381.53 ▼15.71146.69 ▲26.77
Media Library /wp-admin/upload.php1,807 ▲35.02 ▲0.02156.66 ▼2.45123.13 ▼3.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Mailchimp block in action) image not found
The official readme.txt might help

newsletter-form-gutenberg-block-mailchimp/newsletter-form-gutenberg-block-mailchimp.php Passed 13 tests

The main PHP file in "Newsletter Form Block for Mailchimp" ver. 1.02 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
Simple, no-nonsense Mailchimp form block for Gutenberg editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected9,451 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON2008,208
JavaScript6230144731
PHP3120180397
CSS2110115

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity26.00
▷ Minimum class complexity22.00
▷ Maximum class complexity30.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods1132.35%
▷ Public methods2573.53%
▷ Protected methods00.00%
▷ Private methods926.47%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin