83% mailpoet-for-formcraft

Code Review | MailPoet Add-On for FormCraft

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

About plugin

  • Plugin page: mailpoet-for-form...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Jun 6, 2015
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: nish@ncrafts.net (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.92ms] Passed 4 tests

This is a short check of server-side resources used by MailPoet Add-On for FormCraft
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.82 ▼7.61
Dashboard /wp-admin3.33 ▲0.0348.51 ▲2.78
Posts /wp-admin/edit.php3.38 ▲0.0246.74 ▼0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.13 ▼14.78
Media Library /wp-admin/upload.php3.26 ▲0.0236.04 ▲4.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for MailPoet Add-On for FormCraft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.061.75 ▼0.0039.18 ▼0.28
Dashboard /wp-admin2,206 ▲155.86 ▼0.07108.97 ▲8.6741.59 ▼2.88
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0240.12 ▲0.3535.02 ▲0.56
Add New Post /wp-admin/post-new.php1,533 ▼123.17 ▼0.29622.51 ▼76.2946.29 ▼5.41
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0396.30 ▼6.3943.33 ▼3.50

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/mailpoet-for-formcraft/formcraft-mailpoet.php on line 15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/mailpoet-for-formcraft/formcraft-mailpoet.php on line 16
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/mailpoet-for-formcraft/formcraft-mailpoet.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailpoet-for-formcraft/formcraft-mailpoet.php:19
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/mailpoet-for-formcraft/formcraft-mailpoet.php on line 17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

mailpoet-for-formcraft/formcraft-mailpoet.php 85% from 13 tests

The principal PHP file in "MailPoet Add-On for FormCraft" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("mailpoet-for-formcraft.php" instead of "formcraft-mailpoet.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
Everything looks great! No dangerous files found in this plugin330 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS120189
PHP1189123
JavaScript10018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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.png4.18KB2.96KB▼ 29.22%