83% mailchimp-for-formcraft

Code Review | MailChimp Add-On for FormCraft

WordPress plugin MailChimp Add-On for FormCraft scored83%from 54 tests.

About plugin

  • Plugin page: mailchimp-for-for...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2015
  • Latest release: Mar 6, 2020
  • Number of updates: 15
  • Update frequency: every 115.9 days
  • Top authors: nish@ncrafts.net (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /21,665 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.48ms] Passed 4 tests

Server-side resources used by MailChimp Add-On for FormCraft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.89 ▼2.15
Dashboard /wp-admin3.36 ▲0.0545.52 ▼4.99
Posts /wp-admin/edit.php3.41 ▲0.0550.89 ▲0.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.73 ▲7.04
Media Library /wp-admin/upload.php3.28 ▲0.0532.46 ▲0.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for MailChimp Add-On for FormCraft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.131.78 ▼0.0936.98 ▼8.46
Dashboard /wp-admin2,206 ▲185.88 ▲0.99106.58 ▼7.2542.52 ▼1.05
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0139.18 ▲2.9336.64 ▲4.45
Add New Post /wp-admin/post-new.php1,546 ▲2723.42 ▲0.27593.20 ▼107.9963.38 ▲7.41
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0597.16 ▼5.1942.63 ▼3.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailchimp-for-formcraft/formcraft-mailchimp-main.php:16

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 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
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

mailchimp-for-formcraft/formcraft-mailchimp-main.php 85% from 13 tests

The main file in "MailChimp Add-On for FormCraft" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("mailchimp-for-formcraft.php" instead of "formcraft-mailchimp-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin566 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP377148457
JavaScript10082
CSS12027

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.29
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1470.00%
▷ Protected methods00.00%
▷ Private methods630.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png3.80KB2.79KB▼ 26.63%