68% easy-newsletter-signups

Code Review | Easy Newsletter Signups

WordPress plugin Easy Newsletter Signups scored68%from 54 tests.

About plugin

  • Plugin page: easy-newsletter-s...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Jun 28, 2017
  • Latest release: May 30, 2022
  • Number of updates: 31
  • Update frequency: every 58.0 days
  • Top authors: alphabposervice (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /6,204 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲4.62MB] [CPU: ▲15.39ms] Passed 4 tests

Server-side resources used by Easy Newsletter Signups
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.50 ▲5.0462.00 ▲22.36
Dashboard /wp-admin8.52 ▲5.1768.92 ▲1.94
Posts /wp-admin/edit.php8.52 ▲5.1668.88 ▲16.12
Add New Post /wp-admin/post-new.php9.00 ▲3.12116.22 ▲21.12
Media Library /wp-admin/upload.php8.52 ▲5.2965.87 ▲28.49
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5257.54

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 214 new files
Database: 1 new table, 10 new options
New tables
wp_ens_subscribers
New WordPress options
theysaidso_admin_options
fs_gdpr
can_compress_scripts
widget_theysaidso_widget
fs_debug_mode
widget_recent-posts
fs_active_plugins
fs_accounts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Easy Newsletter Signups: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.56 ▼0.799.14 ▲7.3429.12 ▼11.08
Dashboard /wp-admin2,233 ▲455.87 ▲0.9999.53 ▼7.4572.44 ▲20.37
Posts /wp-admin/edit.php2,122 ▲331.97 ▼0.0737.62 ▼2.9733.14 ▼7.00
Add New Post /wp-admin/post-new.php1,682 ▲16322.11 ▼1.09750.74 ▲76.9252.54 ▼0.50
Media Library /wp-admin/upload.php1,412 ▲214.22 ▲0.08104.08 ▼19.1873.52 ▲23.24
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0651.7324.9227.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/easy-newsletter-signups/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ens_subscribers
  • This plugin does not fully uninstall, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_gdpr
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: email capture, email subscribe, subscription, newsletter widget, email newsletter widget...

easy-newsletter-signups/easy-newsletter-signup.php 62% from 13 tests

This is the main PHP file of "Easy Newsletter Signups" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-newsletter-signups.php" instead of "easy-newsletter-signup.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 194 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected45,409 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1117,33016,37630,366
PO File105,5506,66712,010
Sass29399772,523
JavaScript45465247
Markdown1680214
JSON10027
CSS110022

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity82.18
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,153
▷ Static methods17315.00%
▷ Public methods81370.51%
▷ Protected methods151.30%
▷ Private methods32528.19%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants10280.31%
▷ Class constants2519.69%
▷ Public constants25100.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
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%