10% notyf

Code Review | Notyf: Popups, widgets et notifications

WordPress plugin Notyf: Popups, widgets et notifications scored10%from 54 tests.

About plugin

  • Plugin page: notyf
  • Plugin version: 0.2.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Feb 22, 2021
  • Number of updates: 22
  • Update frequency: every 17.4 days
  • Top authors: notyf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /663 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Parse error in wp-content/plugins/notyf/index.php+314
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.22ms] Passed 4 tests

Analyzing server-side resources used by Notyf: Popups, widgets et notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.63 ▼2.80
Dashboard /wp-admin3.31 ▲0.0044.27 ▼0.92
Posts /wp-admin/edit.php3.36 ▲0.0048.09 ▲0.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.62 ▼9.34
Media Library /wp-admin/upload.php3.23 ▲0.0037.46 ▲2.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Notyf: Popups, widgets et notifications: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.111.73 ▼0.1246.30 ▼4.18
Dashboard /wp-admin2,209 ▲185.00 ▲0.05103.61 ▼8.9538.97 ▼3.31
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0635.18 ▼7.8432.90 ▼2.93
Add New Post /wp-admin/post-new.php1,546 ▲422.93 ▼0.09666.72 ▲22.3151.59 ▼2.38
Media Library /wp-admin/upload.php1,391 ▲94.20 ▲0.04103.02 ▲2.5341.90 ▲0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/notyf/index.php on line 314

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: woocommerce, notification, social proof, preuve sociale, bannire...

notyf/index.php 92% from 13 tests

This is the main PHP file of "Notyf: Popups, widgets et notifications" version 0.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("notyf.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin278 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15222239
SVG20131
JavaScript1108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions7
▷ Named functions7100.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
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png47.51KB17.27KB▼ 63.65%
assets/banner-1544x500.png60.64KB26.60KB▼ 56.14%
assets/logo.png23.44KB12.23KB▼ 47.82%