84% include-matomo

Code Review | Include Matomo Tracking, by Jonas Hellmann

WordPress plugin Include Matomo Tracking, by Jonas Hellmann scored84%from 54 tests.

About plugin

  • Plugin page: include-matomo
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.3
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: Jul 27, 2023
  • Number of updates: 24
  • Update frequency: every 79.2 days
  • Top authors: jonashellmann (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /3,942 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.18ms] Passed 4 tests

Analyzing server-side resources used by Include Matomo Tracking, by Jonas Hellmann
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.36 ▲0.49
Dashboard /wp-admin3.33 ▼0.0244.72 ▼18.30
Posts /wp-admin/edit.php3.38 ▲0.0248.36 ▲2.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.60 ▼5.05
Media Library /wp-admin/upload.php3.25 ▲0.0237.05 ▲3.34
Include Matomo /wp-admin/options-general.php?page=include-matomo-settings3.2229.85

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Include Matomo Tracking, by Jonas Hellmann: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.80 ▲0.552.29 ▲0.6445.64 ▲0.63
Dashboard /wp-admin2,207 ▲225.83 ▲0.9498.65 ▼21.7539.24 ▼7.07
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0138.96 ▲3.1234.93 ▼2.61
Add New Post /wp-admin/post-new.php1,517 ▼1117.49 ▼5.82659.26 ▲45.5357.77 ▲7.10
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.06108.06 ▼4.1046.37 ▲0.81
Include Matomo /wp-admin/options-general.php?page=include-matomo-settings8382.0324.9924.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/include-matomo/include-matomo.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

include-matomo/include-matomo.php Passed 13 tests

"Include Matomo Tracking, by Jonas Hellmann" version 1.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
52 characters long description:
This plugin includes Matomo into your Wordpress site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21911101

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin