78% beacon-web-analytics

Code Review | Veracity Bot Detection Tag for WordPress

WordPress plugin Veracity Bot Detection Tag for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: beacon-web-analytics
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2018
  • Latest release: Nov 7, 2023
  • Number of updates: 22
  • Update frequency: every 88.9 days
  • Top authors: beaconmartinb (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /1,315 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.44ms] Passed 4 tests

Server-side resources used by Veracity Bot Detection Tag for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.07 ▼0.12
Dashboard /wp-admin3.32 ▼0.0246.55 ▼14.05
Posts /wp-admin/edit.php3.38 ▲0.0251.77 ▼0.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.71 ▼11.70
Media Library /wp-admin/upload.php3.25 ▲0.0133.53 ▼3.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Veracity Bot Detection Tag for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.22 ▼0.432.21 ▲0.5237.61 ▲0.85
Dashboard /wp-admin2,211 ▲335.62 ▼0.0992.30 ▼21.2038.38 ▼8.45
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0739.51 ▲1.1436.49 ▼1.29
Add New Post /wp-admin/post-new.php1,539 ▲1323.62 ▲0.28619.56 ▼17.4246.12 ▼3.59
Media Library /wp-admin/upload.php1,416 ▲134.23 ▲0.0598.57 ▼8.0342.12 ▼2.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/beacon-web-analytics/Beacon_Tracking_WP.php
    • > /wp-content/plugins/beacon-web-analytics/admin/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/beacon-web-analytics/views/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: wp, tracking, cyber security, analytics, monitoring...

beacon-web-analytics/Beacon_Tracking_WP.php 85% from 13 tests

"Veracity Bot Detection Tag for WordPress" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("beacon-web-analytics.php" instead of "Beacon_Tracking_WP.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 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
There were no executable files found in this plugin63 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3172363

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected