72% blossomthemes-email-newsletter

Code Review | BlossomThemes Email Newsletter

WordPress plugin BlossomThemes Email Newsletter scored72%from 54 tests.

About plugin

  • Plugin page: blossomthemes-ema...
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Oct 2, 2023
  • Number of updates: 352
  • Update frequency: every 6.2 days
  • Top authors: blossomthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30,000+ active /874,836 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.52MB] [CPU: ▲0.88ms] Passed 4 tests

An overview of server-side resources used by BlossomThemes Email Newsletter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.99 ▲1.5348.33 ▲8.32
Dashboard /wp-admin4.83 ▲1.5251.65 ▲0.37
Posts /wp-admin/edit.php4.88 ▲1.5250.08 ▼2.05
Add New Post /wp-admin/post-new.php7.42 ▲1.5396.72 ▼3.12
Media Library /wp-admin/upload.php4.75 ▲1.5244.62 ▲10.31
All Newsletters /wp-admin/edit.php?post_type=subscribe-form4.8346.52
Add New /wp-admin/post-new.php?post_type=subscribe-form4.8655.56

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,360 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_blossomthemes_email_newsletter_widget
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BlossomThemes Email Newsletter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲19813.49 ▼0.898.23 ▲6.6738.25 ▼5.55
Dashboard /wp-admin2,225 ▲455.56 ▼0.1181.59 ▼10.5839.08 ▼2.77
Posts /wp-admin/edit.php2,133 ▲332.01 ▼0.0234.57 ▲0.5436.09 ▼1.67
Add New Post /wp-admin/post-new.php1,563 ▲2818.11 ▼0.12602.83 ▼123.9764.67 ▼12.50
Media Library /wp-admin/upload.php1,436 ▲394.26 ▲0.0695.42 ▼1.5943.39 ▼2.48
All Newsletters /wp-admin/edit.php?post_type=subscribe-form1,2953.5944.8632.15
Add New /wp-admin/post-new.php?post_type=subscribe-form2,1694.5994.9745.94
Settings /wp-admin/class-blossomthemes-email-newsletter-admin.php260.420.0713.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_blossomthemes_email_newsletter_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/blossomthemes-email-newsletter/includes/libs/aweber/subscribe.php
    • > /wp-content/plugins/blossomthemes-email-newsletter/admin/partials/blossomthemes-email-newsletter-admin-display.php
    • > /wp-content/plugins/blossomthemes-email-newsletter/public/partials/blossomthemes-email-newsletter-public-display.php
  • 953× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\ValueList' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/Forms/GetForms/GetFormsFields.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\SearchQuery' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/FileLibrary/Files/GetFiles/GetFilesSearchQuery.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\QueryOperation' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/Forms/GetForm/GetForm.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php-client/tests/Unit/Debugger/JsonStreamReaderTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\QueryOperation' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/TransactionalEmails/Statistics/GetStatistics/GetStatistics.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MailerLiteApi\\Common\\ApiAbstract' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\ValueList' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/Contacts/GetContact/GetContactFields.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Getresponse\\Sdk\\Client\\Operation\\BaseModel' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/src/Operation/Model/TemplateColorVariantShort.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/blossomthemes-email-newsletter/vendor/getresponse/sdk-php/examples/newsletterCreate.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/blossomthemes-email-newsletter/vendor/php-http/message/src/Authentication/AutoBasicAuth.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/class-blossomthemes-email-newsletter-admin.php
    • > Network (severe)
    wp-admin/class-blossomthemes-email-newsletter-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 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
3 plugin tags: newsletter, email, subscribe

blossomthemes-email-newsletter/blossomthemes-email-newsletter.php Passed 13 tests

The principal PHP file in "BlossomThemes Email Newsletter" v. 2.2.5 is loaded by WordPress automatically on each request
78 characters long description:
Easily add email subscription form to your website using shortcode and widget.

Code Analysis 97% from 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
There were no executable files found in this plugin79,908 lines of code in 1,308 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,18714,34025,37567,809
Markdown622,73606,310
JSON33003,292
CSS5192291,671
JavaScript32421442
YAML9373170
XML563154
HTML13030
SVG10011
Dockerfile18010
make1409

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.01
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces275
Interfaces63
Traits18
Classes1,050
▷ Abstract classes212.00%
▷ Concrete classes1,02998.00%
▷ Final classes11611.27%
Methods4,773
▷ Static methods2525.28%
▷ Public methods4,36791.49%
▷ Protected methods1713.58%
▷ Private methods2354.92%
Functions251
▷ Named functions9437.45%
▷ Anonymous functions15762.55%
Constants543
▷ Global constants9317.13%
▷ Class constants45082.87%
▷ Public constants44398.44%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin