94% mailster-piwik

Code Review | Mailster Piwik

WordPress plugin Mailster Piwik scored 94% from 54 tests.

About plugin

  • Plugin page: mailster-piwik
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Jan 13, 2017
  • Latest release: Jan 28, 2022
  • Number of updates: 21
  • Update frequency: every 87.6 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,028 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼292.18ms] Passed 4 tests

Analyzing server-side resources used by Mailster Piwik
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0654.21 ▲3.97
Dashboard /wp-admin3.46 ▲0.0536.89 ▲4.92
Posts /wp-admin/edit.php3.69 ▲0.0538.18 ▲0.77
Add New Post /wp-admin/post-new.php6.93 ▼0.0493.46 ▼1,175.24
Media Library /wp-admin/upload.php3.34 ▲0.0525.53 ▲1.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mailster Piwik
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲5315.61 ▲0.026.10 ▲0.252.83 ▲0.51
Dashboard /wp-admin2,907 ▲535.96 ▼0.22120.87 ▼12.74155.68 ▼3.16
Posts /wp-admin/edit.php2,706 ▲123.24 ▼0.1263.14 ▼0.13140.10 ▲2.06
Add New Post /wp-admin/post-new.php1,768 ▲822.80 ▲5.80424.21 ▼22.60155.38 ▼7.77
Media Library /wp-admin/upload.php1,713 ▲155.52 ▲0.01145.06 ▲3.55187.25 ▼0.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-piwik/mailster-piwik.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: piwik, tracking, analytics, mailster

mailster-piwik/mailster-piwik.php Passed 13 tests

The primary PHP file in "Mailster Piwik" version 1.0 is used by WordPress to initiate all plugin functionality
118 characters long description:
Integrates Piwik Analytics with Mailster Newsletter Plugin to track your clicks with the open source Analytics service

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
Success! There were no dangerous files found in this plugin229 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17869229

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.29
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected