62% subscribe-to-download-lite

Code Review | Subscribe to Download - Download after Email Subscription Form WordPress Plugin

WordPress plugin Subscribe to Download - Download after Email Subscription Form WordPress Plugin scored62%from 54 tests.

About plugin

  • Plugin page: subscribe-to-down...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 32
  • Update frequency: every 50.4 days
  • Top authors: wpshuffle (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /12,475 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.30MB] [CPU: ▲1.24ms] Passed 4 tests

Server-side resources used by Subscribe to Download - Download after Email Subscription Form WordPress Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2335.21 ▼6.30
Dashboard /wp-admin3.68 ▲0.3857.53 ▲5.70
Posts /wp-admin/edit.php3.73 ▲0.3853.38 ▲7.00
Add New Post /wp-admin/post-new.php6.20 ▲0.3196.92 ▼1.04
Media Library /wp-admin/upload.php3.52 ▲0.2937.27 ▲6.60
All Forms /wp-admin/admin.php?page=stdl-settings3.5237.91
About /wp-admin/admin.php?page=stdl-about3.5335.14
Upgrade to PRO /wp-admin/admin.php?page=stdl-upgrade-to-pro3.5338.17
Subscribers /wp-admin/admin.php?page=stdl-subscribers3.5335.00
Help /wp-admin/admin.php?page=stdl-help3.5335.99

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscribe to Download - Download after Email Subscription Form WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,109 ▲34715.46 ▲1.126.03 ▲4.4237.00 ▼6.28
Dashboard /wp-admin2,392 ▲2156.44 ▲0.81118.59 ▲13.3941.96 ▼6.86
Posts /wp-admin/edit.php2,335 ▲2353.58 ▲1.6156.05 ▲19.5435.78 ▲0.64
Add New Post /wp-admin/post-new.php1,582 ▲4723.53 ▲0.86639.93 ▼5.2236.74 ▼19.17
Media Library /wp-admin/upload.php1,466 ▲634.41 ▲0.2180.23 ▼17.7641.26 ▼1.61
All Forms /wp-admin/admin.php?page=stdl-settings1,1063.2640.7586.95
About /wp-admin/admin.php?page=stdl-about1,1433.3640.6170.69
Upgrade to PRO /wp-admin/admin.php?page=stdl-upgrade-to-pro1,2673.3440.6780.94
Subscribers /wp-admin/admin.php?page=stdl-subscribers1,1063.3240.2861.19
Help /wp-admin/admin.php?page=stdl-help1,1263.2941.6554.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_std_subscribers
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • stdl_plugin_install_date
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 19× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-library.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-downloader.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-mobile-detect.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-ajax-admin.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/views/backend/stdl-settings.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-init.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-preview.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/views/backend/stdl-all-forms.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/views/backend/subscribers/list-subscribers.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-activation.php
  • 35× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant STDL_URL - assumed 'STDL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/subscribe-to-download-lite/inc/views/backend/upgrade.php on line 2
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-1.php on line 11
    • > PHP Notice
      Undefined variable: heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-3.php on line 3
    • > PHP Notice
      Undefined variable: heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-2.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-2.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/subscribe-to-download-lite/inc/views/backend/form-sections/form-settings.php:6
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-4.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/download-button.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/stdl-shortcode.php:2
    • > PHP Notice
      Undefined variable: heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-1.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=stdl-settings
    • > Network (severe)
    wp-content/plugins/subscribe-to-download-lite//images/pro.svg - 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

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: subscribe, email, download, subscription, form...

subscribe-to-download-lite/subscribe-to-download-lite.php Passed 13 tests

The main PHP file in "Subscribe to Download - Download after Email Subscription Form WordPress Plugin" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
98 characters long description:
A plugin to collect email using an email subscribing form by providing the free downloadable items

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected20,386 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
SVG50128,798
CSS173,552778,665
PHP393981,0192,705
JavaScript26088218

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity15.14
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods101
▷ Static methods98.91%
▷ Public methods9998.02%
▷ Protected methods21.98%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1052.63%
▷ Class constants947.37%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 1.38MB with 0.73MB 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/assistance.png19.12KB8.23KB▼ 56.95%
images/white-arrow.png4.86KB3.31KB▼ 31.93%
images/flower-bg.png172.20KB49.90KB▼ 71.02%
images/upgrade-to-pro-banner.png85.85KB32.07KB▼ 62.65%