73% beacon-by

Code Review | Beacon Lead Magnets and Lead Capture

WordPress plugin Beacon Lead Magnets and Lead Capture scored73%from 54 tests.

About plugin

  • Plugin page: beacon-by
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Nov 5, 2023
  • Number of updates: 60
  • Update frequency: every 50.2 days
  • Top authors: beaconby (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /56,644 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.65ms] Passed 4 tests

Server-side resources used by Beacon Lead Magnets and Lead Capture
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.32 ▼3.57
Dashboard /wp-admin3.37 ▲0.0747.13 ▼1.39
Posts /wp-admin/edit.php3.48 ▲0.1342.67 ▼2.57
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.32 ▼15.05
Media Library /wp-admin/upload.php3.29 ▲0.0636.69 ▲3.76
Beacon /wp-admin/admin.php?page=beaconby3.2731.44
Help /wp-admin/admin.php?page=beaconby-help3.2732.87
Create /wp-admin/admin.php?page=beaconby-create3.2728.48
Connect /wp-admin/admin.php?page=beaconby-connect3.2731.19

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Beacon Lead Magnets and Lead Capture
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8714.22 ▼0.032.35 ▲0.5544.86 ▲1.16
Dashboard /wp-admin2,229 ▲495.53 ▼0.1386.93 ▼5.3870.28 ▲25.74
Posts /wp-admin/edit.php2,131 ▲311.97 ▼0.0033.98 ▼3.7833.81 ▼1.02
Add New Post /wp-admin/post-new.php1,570 ▲4423.05 ▼0.10676.41 ▲33.02171.05 ▲115.80
Media Library /wp-admin/upload.php1,428 ▲284.20 ▼0.03112.05 ▲1.9979.58 ▲35.20
Beacon /wp-admin/admin.php?page=beaconby9112.0026.0047.91
Help /wp-admin/admin.php?page=beaconby-help8932.0024.4236.05
Create /wp-admin/admin.php?page=beaconby-create9112.0024.4236.53
Connect /wp-admin/admin.php?page=beaconby-connect9082.0024.1239.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=beaconby-connect
    • > Notice in wp-content/plugins/beacon-by/classes/class.beacon_plugin.php+517
    Undefined index: HTTPS

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/beacon-by/views/widget/admin.php
    • > /wp-content/plugins/beacon-by/views/widget/not_configured.php
    • > /wp-content/plugins/beacon-by/views/dashboard/footer.tpl.php
    • > /wp-content/plugins/beacon-by/views/dashboard/help.php
    • > /wp-content/plugins/beacon-by/views/dashboard/embed.php
    • > /wp-content/plugins/beacon-by/views/dashboard/header.tpl.php
    • > /wp-content/plugins/beacon-by/views/widget/form.php
    • > /wp-content/plugins/beacon-by/beacon-by.php
    • > /wp-content/plugins/beacon-by/views/widget/widget.php
  • 66× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/beacon-by/views/widget/widget.php on line 6
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/beacon-by/views/dashboard/create.php on line 36
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/beacon-by/views/dashboard/help.php on line 12
    • > PHP Warning
      Use of undefined constant BEACONBY_CREATE_TARGET - assumed 'BEACONBY_CREATE_TARGET' (this will throw an Error in a future version of PHP) in wp-content/plugins/beacon-by/views/dashboard/header.tpl.php on line 17
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/beacon-by/views/dashboard/create.php on line 85
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/beacon-by/views/dashboard/promote.php on line 49
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/beacon-by/views/dashboard/create.php on line 84
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/beacon-by/views/dashboard/create.php on line 60
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/beacon-by/views/dashboard/promote.php on line 45
    • > PHP Warning
      Use of undefined constant BEACONBY_CREATE_TARGET - assumed 'BEACONBY_CREATE_TARGET' (this will throw an Error in a future version of PHP) in wp-content/plugins/beacon-by/views/dashboard/authorize.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: ebook, lead capture plugin, lead capture form, lead capture, protected content

beacon-by/beacon-by.php Passed 13 tests

The main file in "Beacon Lead Magnets and Lead Capture" v. 1.5.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
32 characters long description:
Create, Promote and Embed eBooks

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,568 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP18368177920
SVG100640
JavaScript418012528
CSS31015480

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity25.50
▷ Minimum class complexity5.00
▷ Maximum class complexity46.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1144.00%
▷ Public methods1560.00%
▷ Protected methods00.00%
▷ Private methods1040.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
i/beacon.png0.64KB0.51KB▼ 19.17%