68% burst-statistics

Code Review | Burst Statistics - Privacy-Friendly Analytics for WordPress

WordPress plugin Burst Statistics - Privacy-Friendly Analytics for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: burst-statistics
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 4, 2022
  • Latest release: Nov 16, 2023
  • Number of updates: 115
  • Update frequency: every 5.8 days
  • Top authors: hesseldejong (86.09%)RogierLankhorst (14.78%)

Code review

54 tests

User reviews

106 reviews

Install metrics

100,000+ active /1,162,917 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.85ms] Passed 4 tests

An overview of server-side resources used by Burst Statistics - Privacy-Friendly Analytics for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1742.31 ▲4.32
Dashboard /wp-admin3.46 ▲0.1253.67 ▼6.95
Posts /wp-admin/edit.php3.51 ▲0.1649.31 ▲1.80
Add New Post /wp-admin/post-new.php6.00 ▲0.1199.39 ▼2.58
Media Library /wp-admin/upload.php3.32 ▲0.0940.64 ▲8.51
Statistics1 /wp-admin/index.php?page=burst3.3145.79

Server storage [IO: ▲2.64MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • The plugin illegally modified 1 file (0.36KB) outside of "wp-content/plugins/burst-statistics/" and "wp-content/uploads/"
    • (new file) burst-statistics-endpoint.php
Filesystem: 312 new files
Database: 4 new tables, 12 new options
New tables
wp_burst_statistics
wp_burst_sessions
wp_burst_goals
wp_burst_goal_statistics
New WordPress options
db_upgraded
burst_options_settings
burst_tracking_status
widget_recent-posts
widget_recent-comments
can_compress_scripts
burst_sessions_db_version
theysaidso_admin_options
burst_stats_db_version
burst_goals_db_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Burst Statistics - Privacy-Friendly Analytics for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,146 ▲39914.14 ▲0.282.54 ▲0.7743.17 ▲0.09
Dashboard /wp-admin2,540 ▲3666.05 ▲0.43113.27 ▲21.9346.45 ▼0.78
Posts /wp-admin/edit.php2,139 ▲391.96 ▲0.0337.03 ▼2.7935.19 ▼2.06
Add New Post /wp-admin/post-new.php1,534 ▲823.56 ▲0.03635.40 ▼78.4563.60 ▼0.09
Media Library /wp-admin/upload.php1,412 ▲124.20 ▲0.04102.26 ▲5.5140.79 ▼5.14
Statistics1 /wp-admin/index.php?page=burst1,5938.58290.0192.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_burst_sessions
    • wp_burst_statistics
    • wp_burst_goals
    • wp_burst_goal_statistics
  • The uninstall procedure has failed, leaving 12 options in the database
    • theysaidso_admin_options
    • burst_goals_db_version
    • burst_sessions_db_version
    • db_upgraded
    • burst_tracking_status
    • widget_recent-posts
    • widget_theysaidso_widget
    • burst_goal_stats_db_version
    • burst_options_settings
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 15× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/burst-statistics/statistics/class-goal-statistics.php
    • > /wp-content/plugins/burst-statistics/integrations/integrations.php
    • > /wp-content/plugins/burst-statistics/class-admin.php
    • > /wp-content/plugins/burst-statistics/class-review.php
    • > /wp-content/plugins/burst-statistics/integrations/plugins/complianz.php
    • > /wp-content/plugins/burst-statistics/dashboard-widget/dashboard-widget.php
    • > /wp-content/plugins/burst-statistics/goals/class-goals.php
    • > /wp-content/plugins/burst-statistics/statistics/class-statistics.php
    • > /wp-content/plugins/burst-statistics/integrations/plugins/woocommerce.php
    • > /wp-content/plugins/burst-statistics/class-db-upgrade.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'burst\\UserAgent\\UserAgentInterface' not found in wp-content/plugins/burst-statistics/helpers/php-user-agent/UserAgent/UserAgent.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("paypal.me/Burststatistics")
Please take inspiration from this readme.txt

burst-statistics/burst.php 92% from 13 tests

The main PHP file in "Burst Statistics - Privacy-Friendly Analytics for WordPress" ver. 1.5.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("burst-statistics.php" instead of "burst.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected26,682 lines of code in 273 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1631,4671,20011,239
PHP401,1111,6926,690
Sass57574644,323
CSS6789434,138
LESS1300152
XML13910795
SVG30028
Markdown214017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.38
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces1
Interfaces3
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods156
▷ Static methods95.77%
▷ Public methods13687.18%
▷ Protected methods00.00%
▷ Private methods2012.82%
Functions154
▷ Named functions13285.71%
▷ Anonymous functions2214.29%
Constants95
▷ Global constants1515.79%
▷ Class constants8084.21%
▷ Public constants80100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/sort_asc.png1.02KB0.25KB▼ 75.93%
assets/img/sort_desc.png1.04KB0.25KB▼ 76.32%
upgrade/img/really-simple-ssl.png11.96KB6.41KB▼ 46.40%
upgrade/img/complianz-gdpr.png4.47KB1.85KB▼ 58.71%
assets/img/Burst-review-notice.png2.71KB2.06KB▼ 24.02%