68% wp-subscription-forms

Code Review | WP Subscription Forms - The Ultimate WordPress Subscription Form Plugin

WordPress plugin WP Subscription Forms - The Ultimate WordPress Subscription Form Plugin scored68%from 54 tests.

About plugin

  • Plugin page: wp-subscription-f...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 32
  • Update frequency: every 47.7 days
  • Top authors: wpshuffle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /9,004 total downloads

Benchmarks

Plugin footprint 65% 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.37MB] [CPU: ▼3.62ms] Passed 4 tests

Analyzing server-side resources used by WP Subscription Forms - The Ultimate WordPress Subscription Form Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2738.53 ▼7.35
Dashboard /wp-admin3.76 ▲0.4652.44 ▲0.71
Posts /wp-admin/edit.php3.81 ▲0.4555.24 ▲7.37
Add New Post /wp-admin/post-new.php6.27 ▲0.3882.01 ▼9.90
Media Library /wp-admin/upload.php3.59 ▲0.3637.85 ▲2.05
Subscribers /wp-admin/admin.php?page=wpsf-subscribers3.6141.64
Add Subscription Form /wp-admin/admin.php?page=add-subscription-form3.6438.62
Subscription Forms /wp-admin/admin.php?page=wp-subscription-forms3.6141.44
About /wp-admin/admin.php?page=wpsf-about3.6038.03
Help /wp-admin/admin.php?page=wpsf-help3.6036.47

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 116 new files
Database: 2 new tables, 8 new options
New tables
wp_wpsf_forms
wp_wpsf_subscribers
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_wpsf_widget
wpsf_plugin_install_date

Browser metrics Passed 4 tests

Checking browser requirements for WP Subscription Forms - The Ultimate WordPress Subscription Form Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,111 ▲36015.09 ▲0.746.36 ▲4.7637.01 ▼5.25
Dashboard /wp-admin2,392 ▲2156.45 ▲0.79120.40 ▲12.4245.06 ▼5.62
Posts /wp-admin/edit.php2,329 ▲2323.69 ▲1.6955.85 ▲17.8736.16 ▼1.79
Add New Post /wp-admin/post-new.php1,582 ▲5621.23 ▼1.81678.34 ▼6.7636.42 ▼31.34
Media Library /wp-admin/upload.php1,463 ▲604.43 ▲0.2680.28 ▼26.5243.04 ▼3.22
Subscribers /wp-admin/admin.php?page=wpsf-subscribers1,1353.3545.7870.77
Add Subscription Form /wp-admin/admin.php?page=add-subscription-form1,7493.5246.4688.47
Subscription Forms /wp-admin/admin.php?page=wp-subscription-forms1,1083.4046.2949.50
About /wp-admin/admin.php?page=wpsf-about1,1513.3143.7653.32
Help /wp-admin/admin.php?page=wpsf-help1,1353.3743.0268.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_wpsf_forms
    • wp_wpsf_subscribers
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_wpsf_widget
    • widget_recent-comments
    • wpsf_plugin_install_date
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 19× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-subscription-forms/inc/views/backend/forms/subscription-form-add.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-ajax-admin.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-review.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-hooks.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-activation.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-init.php
    • > /wp-content/plugins/wp-subscription-forms/inc/views/backend/forms/subscription-forms-list.php
    • > /wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-mobile-detect.php
    • > /wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-preview.php
    • > /wp-content/plugins/wp-subscription-forms/inc/views/backend/subscribers/list-subscribers.php
  • 56× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-8.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-5.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-subscription-forms/inc/views/backend/upgrade-to-pro.php:6
    • > PHP Notice
      Undefined variable: name_show in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-6.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-2.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/wp-subscription-forms/inc/views/frontend/wpsf-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-subscription-forms/inc/classes/class-wpsf-widget.php:4
    • > PHP Notice
      Undefined variable: name_show in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-4.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-subscription-forms/inc/views/backend/form-sections/form-settings.php:5
    • > PHP Notice
      Undefined variable: name_show in wp-content/plugins/wp-subscription-forms/inc/views/frontend/form-templates/template-9.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

wp-subscription-forms/wp-subscription-forms.php Passed 13 tests

The main PHP script in "WP Subscription Forms - The Ultimate WordPress Subscription Form Plugin" version 1.2.1 is automatically included on every request by WordPress
89 characters long description:
A simple plugin to create subscription forms and use it to collect subscribers from site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin22,892 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
CSS183,9757310,852
SVG30128,777
PHP424321,0832,829
JavaScript255137434

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.54
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods101
▷ Static methods109.90%
▷ Public methods9998.02%
▷ Protected methods21.98%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants20
▷ Global constants1155.00%
▷ Class constants945.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.59MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cloud-bg.png4.44KB2.57KB▼ 42.13%
images/template-8-icon.png7.06KB3.42KB▼ 51.54%
images/assistance.png18.81KB8.15KB▼ 56.65%
images/upgradeToPro-40per.png131.10KB52.19KB▼ 60.19%
images/upgradeToPro1.png79.64KB35.92KB▼ 54.90%