68% subscribe-to-unlock-lite

Code Review | Subscribe to Unlock Lite - Opt In Content Locker Plugin for WordPress

WordPress plugin Subscribe to Unlock Lite - Opt In Content Locker Plugin for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: subscribe-to-unlo...
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 37
  • Update frequency: every 42.5 days
  • Top authors: wpshuffle (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active /13,440 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 gracefully, with no errors

Server metrics [RAM: ▲0.29MB] [CPU: ▼8.04ms] Passed 4 tests

This is a short check of server-side resources used by Subscribe to Unlock Lite - Opt In Content Locker Plugin for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2437.33 ▼2.77
Dashboard /wp-admin3.68 ▲0.3352.34 ▼10.23
Posts /wp-admin/edit.php3.73 ▲0.3750.54 ▲4.63
Add New Post /wp-admin/post-new.php6.19 ▲0.3182.82 ▼22.96
Media Library /wp-admin/upload.php3.52 ▲0.2936.60 ▲3.81
About /wp-admin/admin.php?page=stul-about3.5237.45
Subscribers /wp-admin/admin.php?page=stul-subscribers3.5237.87
Settings /wp-admin/admin.php?page=stul-settings3.6142.73
Help /wp-admin/admin.php?page=stul-help3.5237.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 89 new files
Database: 1 new table, 7 new options
New tables
wp_stul_subscribers
New WordPress options
db_upgraded
can_compress_scripts
stul_plugin_install_date
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Subscribe to Unlock Lite - Opt In Content Locker Plugin for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,115 ▲36815.22 ▲0.466.20 ▲4.3336.18 ▼8.02
Dashboard /wp-admin2,390 ▲2136.57 ▲0.96123.98 ▲23.5942.08 ▼5.38
Posts /wp-admin/edit.php2,333 ▲2333.67 ▲1.7348.44 ▲8.9331.25 ▼3.44
Add New Post /wp-admin/post-new.php1,584 ▲5823.20 ▲0.06641.55 ▲4.6336.59 ▼15.23
Media Library /wp-admin/upload.php1,464 ▲614.42 ▲0.2682.24 ▼16.7942.84 ▼2.91
About /wp-admin/admin.php?page=stul-about1,1613.3845.0635.06
Subscribers /wp-admin/admin.php?page=stul-subscribers1,1123.2744.6671.13
Settings /wp-admin/admin.php?page=stul-settings2,3196.83144.36127.32
Help /wp-admin/admin.php?page=stul-help1,1453.3343.7063.37

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
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_stul_subscribers
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • stul_plugin_install_date
    • theysaidso_admin_options
    • can_compress_scripts

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
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
Please take a closer look at the following
  • 16× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/views/backend/stul-settings.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/classes/class-stul-library.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-preview.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/classes/class-stul-enqueue.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/cores/subscription-process.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/subscribe-to-unlock-lite.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/classes/class-stul-ajax-admin.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/classes/class-stul-ajax.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/views/backend/subscribers/list-subscribers.php
    • > /wp-content/plugins/subscribe-to-unlock-lite/inc/classes/class-stul-init.php
  • 71× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-6.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-2.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-3.php:39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/stul-shortcode.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/stul-shortcode.php on line 27
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-1.php on line 22
    • > PHP Notice
      Undefined variable: name_show in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-2.php on line 33
    • > PHP Notice
      Undefined variable: sub_heading_show in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/form-templates/template-3.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/subscribe-to-unlock-lite/inc/views/frontend/stul-shortcode.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/subscribe-to-unlock-lite/inc/views/backend/form-sections/form-settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

subscribe-to-unlock-lite/subscribe-to-unlock-lite.php 92% from 13 tests

Analyzing the main PHP file in "Subscribe to Unlock Lite - Opt In Content Locker Plugin for WordPress" version 1.2.7
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected21,930 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
CSS193,8897710,178
SVG30128,777
PHP363569532,466
JavaScript357123509

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods90
▷ Static methods910.00%
▷ Public methods8897.78%
▷ Protected methods22.22%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants1155.00%
▷ Class constants945.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
6 PNG files occupy 0.22MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tinymce-lock-icon.png0.44KB0.50KB0.00%
images/stu-upgradeBanner.png78.62KB33.12KB▼ 57.87%
images/assistance.png23.19KB9.90KB▼ 57.32%
images/lockIcon.png6.46KB2.84KB▼ 55.97%
images/upgrade-to-pro-banner.png75.28KB30.94KB▼ 58.89%