74% enormail-sign-up-forms

Code Review | Enormail Sign Up Forms

WordPress plugin Enormail Sign Up Forms scored 74% from 54 tests.

About plugin

  • Plugin page: enormail-sign-up-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Mar 11, 2023
  • Number of updates: 17
  • Update frequency: every 81.4 days
  • Top authors: enormail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,991 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Enormail Sign Up Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.59 ▲1.94
Dashboard /wp-admin3.59 ▲0.2952.23 ▼0.22
Posts /wp-admin/edit.php3.64 ▲0.2949.01 ▼1.53
Add New Post /wp-admin/post-new.php6.13 ▲0.2498.80 ▲6.54
Media Library /wp-admin/upload.php3.45 ▲0.2234.77 ▼0.38
Settings /wp-admin/admin.php?page=enormail-api-key3.4233.58
Forms /wp-admin/admin.php?page=enormail-admin3.49312.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: 1 new table, 7 new options
New tables
wp_enormail_forms
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_enormail-widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Enormail Sign Up Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.31 ▼1.061.58 ▼0.3042.46 ▼4.84
Dashboard /wp-admin2,246 ▲585.89 ▲1.0199.40 ▼17.8937.45 ▼2.06
Posts /wp-admin/edit.php2,133 ▲442.06 ▲0.0537.01 ▼1.9035.59 ▼0.50
Add New Post /wp-admin/post-new.php1,540 ▲723.08 ▼0.11656.81 ▼10.8552.48 ▼2.21
Media Library /wp-admin/upload.php1,431 ▲404.27 ▲0.1299.40 ▼0.4939.95 ▼5.67
Settings /wp-admin/admin.php?page=enormail-api-key8431.7227.2627.62
Forms /wp-admin/admin.php?page=enormail-admin8692.0723.7832.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_enormail_forms
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_enormail-widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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
Please fix the following
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/enormail-sign-up-forms/admin/partials/enormail-admin-header.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/enormail-sign-up-forms/includes/class-enormail-forms-list.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/enormail-sign-up-forms/includes/class-enormail-forms-list.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/enormail-sign-up-forms/includes/class-enormail-widget.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'EM_Base' not found in wp-content/plugins/enormail-sign-up-forms/includes/emapi/account.php:9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/enormail-sign-up-forms/includes/class-enormail-forms-list.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/enormail-sign-up-forms/admin/partials/enormail-admin-header.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EM_Base' not found in wp-content/plugins/enormail-sign-up-forms/includes/emapi/lists.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'EM_Base' not found in wp-content/plugins/enormail-sign-up-forms/includes/emapi/mailings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/enormail-sign-up-forms/admin/partials/enormail-admin-header.php:3

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 Passed 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
6 plugin tags: webform, newsletter, subscribe, form, email...

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

The main PHP file in "Enormail Sign Up Forms" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("enormail-sign-up-forms.php" instead of "enormail.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,434 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP324809751,192
PO File14976113
CSS120383
JavaScript24046

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.87
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods104
▷ Static methods1110.58%
▷ Public methods9086.54%
▷ Protected methods10.96%
▷ Private methods1312.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/enormail-shortcode-icon.png14.95KB0.52KB▼ 96.50%
admin/img/enormail-email-marketing-icon.png0.79KB1.01KB0.00%