90% piwik-pro

Code Review | Piwik PRO

WordPress plugin Piwik PRO scored90%from 54 tests.

About plugin

  • Plugin page: piwik-pro
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Oct 25, 2023
  • Number of updates: 13
  • Update frequency: every 71.0 days
  • Top authors: piwikpro (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /14,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼5.15ms] Passed 4 tests

Server-side resources used by Piwik PRO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.06 ▲2.74
Dashboard /wp-admin3.62 ▲0.3147.56 ▲1.44
Posts /wp-admin/edit.php3.67 ▲0.3146.62 ▼0.75
Add New Post /wp-admin/post-new.php6.14 ▲0.2483.68 ▼21.94
Media Library /wp-admin/upload.php3.48 ▲0.2435.50 ▲0.65
Piwik PRO /wp-admin/options-general.php?page=piwik-pro3.4832.60

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
piwik_pro
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Piwik PRO
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲6014.28 ▼0.281.76 ▲0.1738.51 ▼9.03
Dashboard /wp-admin2,198 ▲205.51 ▼0.2282.82 ▼27.4936.46 ▼7.09
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0432.65 ▼2.4232.61 ▼2.80
Add New Post /wp-admin/post-new.php1,530 ▲423.08 ▼0.21648.79 ▼58.0966.20 ▼4.95
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0994.23 ▼17.8842.26 ▼6.06
Piwik PRO /wp-admin/options-general.php?page=piwik-pro9352.0324.6238.36

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: piwik pro, analytics, piwik, website stats, woocommerce

piwik-pro/plugin.php 92% from 13 tests

"Piwik PRO" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("piwik-pro.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,061 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP27207172913
JSON20075
Markdown212073

PHP code Passed 2 tests

An overview of 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.79
Average class complexity20.88
▷ Minimum class complexity2.00
▷ Maximum class complexity90.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods59
▷ Static methods711.86%
▷ Public methods3864.41%
▷ Protected methods2135.59%
▷ Private methods00.00%
Functions12
▷ Named functions00.00%
▷ Anonymous functions12100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin