84% simple-matomo-tracking-code

Code Review | Simple Matomo Tracking Code

WordPress plugin Simple Matomo Tracking Code scored84%from 54 tests.

About plugin

  • Plugin page: simple-matomo-tra...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Sep 20, 2023
  • Number of updates: 28
  • Update frequency: every 35.8 days
  • Top authors: rbaer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /3,029 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.90ms] Passed 4 tests

Analyzing server-side resources used by Simple Matomo Tracking Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.36 ▲3.13
Dashboard /wp-admin3.36 ▲0.0250.32 ▼18.51
Posts /wp-admin/edit.php3.41 ▲0.0647.66 ▼3.47
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.38 ▼8.49
Media Library /wp-admin/upload.php3.28 ▲0.0638.41 ▼1.12
All Posts /wp-admin/edit.php?post_type=book3.3337.00
Add New /wp-admin/post-new.php?post_type=book3.4049.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
MatomoAnalyticsPP
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Matomo Tracking Code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.28 ▼0.071.76 ▲0.1044.85 ▲1.64
Dashboard /wp-admin2,226 ▲525.66 ▲0.0588.89 ▼8.3236.09 ▼7.39
Posts /wp-admin/edit.php2,128 ▲312.05 ▲0.0335.53 ▼5.9936.70 ▼0.31
Add New Post /wp-admin/post-new.php1,567 ▲2718.27 ▼0.15632.00 ▼1.7051.65 ▲2.24
Media Library /wp-admin/upload.php1,431 ▲284.25 ▲0.0195.93 ▼5.6741.97 ▲0.74
All Posts /wp-admin/edit.php?post_type=book1,0952.0031.5931.73
Simple Matomo Tracking Code /wp-admin/simple-matomo-tracking-code.php260.440.1016.38
Add New /wp-admin/post-new.php?post_type=book2,1797.57187.2962.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/simple-matomo-tracking-code.php
    • > Network (severe)
    wp-admin/simple-matomo-tracking-code.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: matomo, piwik, statistics, analytics, stats

simple-matomo-tracking-code/simple-matomo-tracking-code.php Passed 13 tests

"Simple Matomo Tracking Code" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
This plugin makes it simple to add Matomo Web Analytics code to your WebSite.

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
There were no executable files found in this plugin259 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24336259

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.50
▷ Minimum class complexity6.00
▷ Maximum class complexity19.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods888.89%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin