84% beam-analytics

Code Review | Beam Analytics for WordPress

WordPress plugin Beam Analytics for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: beam-analytics
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2023
  • Latest release: Nov 3, 2023
  • Number of updates: 9
  • Update frequency: every 25.9 days
  • Top authors: wpsunshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Beam Analytics for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.48 ▼2.01
Dashboard /wp-admin3.39 ▲0.0546.06 ▼14.21
Posts /wp-admin/edit.php3.51 ▲0.1547.74 ▼1.20
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.11 ▼1.98
Media Library /wp-admin/upload.php3.32 ▲0.0935.30 ▲3.75
Beam Analytics /wp-admin/options-general.php?page=wps_beam_analytics3.2628.00

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
wps_beam_analytics
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Beam Analytics for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.22 ▼0.111.65 ▼0.0641.81 ▲2.57
Dashboard /wp-admin2,199 ▲185.58 ▼0.1391.83 ▼10.7242.12 ▼3.48
Posts /wp-admin/edit.php2,107 ▲42.09 ▲0.1340.75 ▼1.2634.05 ▼2.45
Add New Post /wp-admin/post-new.php1,529 ▲323.30 ▲0.26675.63 ▲0.8562.28 ▲8.34
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.0796.83 ▼3.5345.56 ▲0.37
Beam Analytics /wp-admin/options-general.php?page=wps_beam_analytics1,0622.0023.5041.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • wps_beam_analytics
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wps_beam_analytics
    • > Notice in wp-content/plugins/beam-analytics/includes/admin/class-options.php+200
    Undefined index: token

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: tracking, beam analytics, analytics, beam, stats

beam-analytics/beam-analytics.php Passed 13 tests

The principal PHP file in "Beam Analytics for WordPress" v. 1.0.1 is loaded by WordPress automatically on each request
58 characters long description:
Connect your Beam Analytics account to your WordPress site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin448 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP498177401
CSS110046
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.00
▷ Minimum class complexity18.00
▷ Maximum class complexity24.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2388.46%
▷ Protected methods00.00%
▷ Private methods311.54%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin