74% wp-piwik-notifier

Code Review | Piwik Notifier Bar

WordPress plugin Piwik Notifier Bar scored74%from 54 tests.

About plugin

  • Plugin page: wp-piwik-notifier
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Jul 10, 2014
  • Latest release: Jul 10, 2014
  • Number of updates: 25
  • Update frequency: N/A
  • Top authors: scharc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,315 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.83ms] Passed 4 tests

Analyzing server-side resources used by Piwik Notifier Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.20 ▼6.46
Dashboard /wp-admin3.35 ▲0.0550.16 ▲6.78
Posts /wp-admin/edit.php3.40 ▲0.0443.14 ▲2.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.67 ▼16.21
Media Library /wp-admin/upload.php3.27 ▲0.0436.01 ▲4.53
Piwik Notifier /wp-admin/options-general.php?page=wppn-settings3.2737.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
wp_piwik_notifier_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Piwik Notifier Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.32 ▼0.031.75 ▼0.0344.70 ▼2.15
Dashboard /wp-admin2,210 ▲335.59 ▼0.0293.24 ▲1.4142.61 ▲7.10
Posts /wp-admin/edit.php2,116 ▲132.01 ▲0.0334.28 ▼6.1535.58 ▼3.46
Add New Post /wp-admin/post-new.php1,540 ▲323.00 ▲4.80618.86 ▲10.1470.92 ▲6.17
Media Library /wp-admin/upload.php1,415 ▲184.21 ▲0.0497.70 ▼0.9941.04 ▼1.01
Piwik Notifier /wp-admin/options-general.php?page=wppn-settings9861.9923.7627.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Incomplete uninstall procedure, leaving 12 files (0.03MB) in the plugin directory
    • (new file) inc/wppn-notifier-bar.php
    • (new file) css/gray.css
    • (new file) inc/wppn-piwik-iframe.php
    • (new file) css/red.css
    • (new file) readme.txt
    • (new file) lang/wp-piwik-notifier-de_DE.mo
    • (new file) inc/wppn-settings-page.php
    • (new file) lang/wp-piwik-notifier-de_DE.po
    • (new file) css/blue.css
    • (new file) js/main.js
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • wp_piwik_notifier_options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-piwik-notifier/wppn-config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-piwik-notifier/inc/wppn-piwik-iframe.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-piwik-notifier/inc/wppn-settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-piwik-notifier/inc/wppn-notifier-bar.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-piwik-notifier === )
Please take inspiration from this readme.txt

wp-piwik-notifier/wp-piwki-notifier.php 92% from 13 tests

This is the main PHP file of "Piwik Notifier Bar" version 0.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-piwik-notifier.php" instead of "wp-piwki-notifier.php")

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
Everything looks great! No dangerous files found in this plugin623 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP535141285
CSS3150264
PO File1192055
JavaScript13019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin