79% subscribe-to-download-lite

Code Review | Subscribe to Download - An opt in to download plugin

WordPress plugin Subscribe to Download - An opt in to download plugin scored 79% from 54 tests.

About plugin

  • Plugin page: subscribe-to-down...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.8.1
  • First release: Jul 3, 2019
  • Latest release: Feb 10, 2022
  • Number of updates: 23
  • Update frequency: every 41.4 days
  • Top authors: wpshuffle (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 7,127 total downloads

Benchmarks

Plugin footprint 83% 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.28MB] [CPU: ▼144.75ms] Passed 4 tests

Server-side resources used by Subscribe to Download - An opt in to download plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.07 ▲0.2333.43 ▲8.29
Dashboard /wp-admin3.42 ▲0.3645.68 ▲6.36
Posts /wp-admin/edit.php3.47 ▲0.3642.40 ▲8.85
Add New Post /wp-admin/post-new.php5.70 ▲0.2671.64 ▼593.35
Media Library /wp-admin/upload.php3.28 ▲0.2726.25 ▼0.31
Subscribers /wp-admin/admin.php?page=stdl-subscribers3.2829.11
About /wp-admin/admin.php?page=stdl-about3.2827.20
Help /wp-admin/admin.php?page=stdl-help3.2825.34
Settings /wp-admin/admin.php?page=stdl-settings3.3831.48

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 94 new files
Database: 1 new table, no new options
New tables
wp_std_subscribers

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscribe to Download - An opt in to download plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,092 ▲49118.51 ▲2.959.73 ▲4.8577.07 ▼5.67
Dashboard /wp-admin3,191 ▲2968.41 ▲2.27141.82 ▲10.73171.16 ▼2.02
Posts /wp-admin/edit.php3,028 ▲2884.90 ▲1.6783.01 ▲18.78138.57 ▼26.43
Add New Post /wp-admin/post-new.php2,547 ▼1,19416.55 ▼2.44379.01 ▼100.03174.84 ▲6.96
Media Library /wp-admin/upload.php1,816 ▲645.88 ▲0.38111.88 ▼49.10192.76 ▼5.25
Subscribers /wp-admin/admin.php?page=stdl-subscribers1,4494.8373.99162.70
About /wp-admin/admin.php?page=stdl-about1,5124.8270.84177.01
Help /wp-admin/admin.php?page=stdl-help1,5024.8199.13199.18
Settings /wp-admin/admin.php?page=stdl-settings2,6954.8180.29220.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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

Smoke tests 50% 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
  • 17× 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/cores/subscription-process.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-enqueue.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-hooks.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-activation.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-init.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-library.php
    • > /wp-content/plugins/subscribe-to-download-lite/inc/classes/class-stdl-metabox.php
  • 32× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > 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:5
    • > 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 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 Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-2.php on line 11
    • > 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/stdl-about.php on line 4
    • > 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/layout-settings.php:5
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-3.php on line 11
    • > 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 Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/subscribe-to-download-lite/inc/views/frontend/form-templates/template-1.php:31
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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: download, email, subscription plugin, subscribe, subscription...

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

The main PHP file in "Subscribe to Download - An opt in to download plugin" ver. 1.1.7 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 detected19,670 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,777
CSS173,541648,273
PHP353551,0062,402
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.45
Average class complexity15.54
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods95
▷ Static methods99.47%
▷ Public methods9397.89%
▷ Protected methods22.11%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants950.00%
▷ Class constants950.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flower-bg.png172.20KB49.90KB▼ 71.02%
images/logo.png7.20KB3.40KB▼ 52.75%
images/white-arrow.png4.86KB3.31KB▼ 31.93%
images/icon3.png5.55KB2.54KB▼ 54.32%
images/upgradeImg.png75.84KB31.22KB▼ 58.83%