84% formcraft-mymail

Code Review | Mailster Add-On for FormCraft

WordPress plugin Mailster Add-On for FormCraft scored84%from 54 tests.

About plugin

  • Plugin page: formcraft-mymail
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Dec 20, 2017
  • Number of updates: 7
  • Update frequency: every 131.3 days
  • Top authors: nish@ncrafts.net (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,307 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼14.28ms] Passed 4 tests

A check of server-side resources used by Mailster Add-On for FormCraft
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.86 ▼4.06
Dashboard /wp-admin3.31 ▼0.0349.02 ▼15.69
Posts /wp-admin/edit.php3.36 ▲0.0144.57 ▼9.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.75 ▼27.37
Media Library /wp-admin/upload.php3.23 ▲0.0034.79 ▼1.95

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

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

Browser metrics Passed 4 tests

Mailster Add-On for FormCraft: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.021.83 ▲0.1744.63 ▲4.87
Dashboard /wp-admin2,195 ▲185.58 ▼0.1193.72 ▼5.6647.55 ▲7.56
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0634.83 ▼7.1537.46 ▲2.95
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▼0.08601.09 ▼77.1843.69 ▼7.43
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.0494.76 ▼8.4442.16 ▼1.43

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/formcraft-mymail/formcraft-mymail.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

formcraft-mymail/formcraft-mymail.php 92% from 13 tests

The main PHP file in "Mailster Add-On for FormCraft" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
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

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 detected180 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1159134
CSS12029
JavaScript10017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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

Often times overlooked, PNG files can occupy unnecessary space in 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.png2.12KB1.24KB▼ 41.51%