89% matomo-analytics

Code Review | AJdG Matomo Tracker

WordPress plugin AJdG Matomo Tracker scored89%from 54 tests.

About plugin

  • Plugin page: matomo-analytics
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2019
  • Latest release: Mar 1, 2023
  • Number of updates: 28
  • Update frequency: every 41.9 days
  • Top authors: adegans (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,077 total downloads

Benchmarks

Plugin footprint 82% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.68ms] 75% from 4 tests

This is a short check of server-side resources used by AJdG Matomo Tracker
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,334.63ms on /wp-admin/tools.php?page=matomo-tracker)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.77 ▼8.47
Dashboard /wp-admin3.32 ▼0.0349.31 ▼19.44
Posts /wp-admin/edit.php3.37 ▲0.0148.16 ▲0.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.09 ▼2.41
Media Library /wp-admin/upload.php3.24 ▲0.0135.28 ▼0.41
Matomo Tracker /wp-admin/tools.php?page=matomo-tracker4.441,334.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 17 new options
New WordPress options
ajdg_matomo_hide_review
ajdg_matomo_track_error_pages
ajdg_matomo_siteurl
ajdg_matomo_heartbeat_enable
ajdg_matomo_wc_downloads
ajdg_matomo_track_feed_impressions
widget_recent-posts
ajdg_matomo_high_accuracy
ajdg_matomo_track_feed_clicks
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for AJdG Matomo Tracker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▼0.021.57 ▼0.2244.42 ▲0.64
Dashboard /wp-admin2,198 ▲245.57 ▼0.0686.23 ▼14.8038.10 ▼6.50
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0242.72 ▲5.9134.60 ▲0.20
Add New Post /wp-admin/post-new.php1,531 ▲523.54 ▼0.19701.99 ▲12.3268.71 ▲3.27
Media Library /wp-admin/upload.php1,406 ▲94.15 ▼0.0592.82 ▼13.0646.03 ▲2.30
Matomo Tracker /wp-admin/tools.php?page=matomo-tracker1,1882.1125.1542.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

matomo-analytics/ajdg-matomo-tracker.php 85% from 13 tests

The main file in "AJdG Matomo Tracker" v. 1.2.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("matomo-analytics.php" instead of "ajdg-matomo-tracker.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected418 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP496117397
CSS12221

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.35
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%
Functions17
▷ Named functions17100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/notification.png4.16KB1.91KB▼ 54.05%