84% subscribe2

Code Review | Subscribe2 - Form, Email Subscribers & Newsletters

WordPress plugin Subscribe2 - Form, Email Subscribers & Newsletters scored84%from 54 tests.

About plugin

  • Plugin page: subscribe2
  • Plugin version: 10.42
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2005
  • Latest release: Nov 23, 2023
  • Number of updates: 1,247
  • Update frequency: every 5.4 days
  • Top authors: MattyRob (84.12%)tanaylakhani (9.14%)skippy (3.77%)Collizo4sky (1.84%)tareq1988 (1.28%)

Code review

54 tests

User reviews

113 reviews

Install metrics

20,000+ active /2,379,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.87MB] [CPU: ▲3.97ms] Passed 4 tests

Analyzing server-side resources used by Subscribe2 - Form, Email Subscribers & Newsletters
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7243.58 ▼1.47
Dashboard /wp-admin4.24 ▲0.9354.56 ▲3.02
Posts /wp-admin/edit.php4.28 ▲0.9257.42 ▲6.31
Add New Post /wp-admin/post-new.php6.83 ▲0.94104.64 ▲11.59
Media Library /wp-admin/upload.php4.15 ▲0.9242.60 ▲8.03
Send Email /wp-admin/admin.php?page=s2_posts4.1143.42
Your Subscriptions /wp-admin/admin.php?page=s24.2541.32
Subscribers /wp-admin/admin.php?page=s2_tools4.3644.23
Settings /wp-admin/admin.php?page=s2_settings4.4343.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 64 new files
Database: 1 new table, 8 new options
New tables
wp_subscribe2
New WordPress options
subscribe2_options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_s2_form_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Subscribe2 - Form, Email Subscribers & Newsletters
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10814.67 ▲0.331.65 ▼0.1938.28 ▼5.85
Dashboard /wp-admin2,260 ▲835.55 ▼0.0997.70 ▼1.6484.77 ▲40.32
Posts /wp-admin/edit.php2,137 ▲401.96 ▲0.0139.04 ▲0.9134.78 ▼4.52
Add New Post /wp-admin/post-new.php6,392 ▲4,86228.76 ▲5.76881.16 ▲256.2037.52 ▼23.53
Media Library /wp-admin/upload.php1,437 ▲374.13 ▼0.1492.63 ▼3.6573.56 ▲31.03
Send Email /wp-admin/admin.php?page=s2_posts9812.1425.8535.81
Your Subscriptions /wp-admin/admin.php?page=s29032.1927.8531.97
Subscribers /wp-admin/admin.php?page=s2_tools1,1762.1726.0331.16
Settings /wp-admin/admin.php?page=s2_settings1,1662.1028.5131.57

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_s2_form_widget

Smoke tests 75% 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 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 items
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/subscribe2/classes/class-s2-list-table.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/subscribe2/classes/class-s2-form-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/subscribe2/gutenberg/gutenberg-translations.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'S2_Core' not found in wp-content/plugins/subscribe2/classes/class-s2-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/subscribe2/classes/class-s2-counter-widget.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'S2PATHtraits/ShortcodeTrait.php' (include_path='.:/usr/share/php') in wp-content/plugins/subscribe2/classes/class-s2-core.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/subscribe2/include/options.php:144
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/subscribe2/subscribe2.php:36
    • > PHP Notice
      Undefined index: wp_version in wp-content/plugins/subscribe2/subscribe2.php on line 34
    • > PHP Warning
      Use of undefined constant S2PATH - assumed 'S2PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/subscribe2/classes/class-s2-core.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in subscribe2/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

subscribe2/subscribe2.php Passed 13 tests

"Subscribe2 - Form, Email Subscribers & Newsletters" version 10.42's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
51 characters long description:
Notifies an email list when new entries are posted.

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
There were no executable files found in this plugin8,938 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,8052,2657,607
JavaScript2463631,033
Markdown1700196
CSS324081
JSON10021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity63.39
▷ Minimum class complexity8.00
▷ Maximum class complexity352.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods276
▷ Static methods20.72%
▷ Public methods22681.88%
▷ Protected methods62.17%
▷ Private methods4415.94%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/email-edit.png0.74KB0.83KB0.00%
include/s2-marker.png1.13KB0.83KB▼ 26.17%
include/s2-button.png0.40KB0.32KB▼ 19.46%