10% favicon-notifications

Code Review | Favicon Notifications

WordPress plugin Favicon Notifications scored10%from 54 tests.

About plugin

  • Plugin page: favicon-notificat...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Sep 22, 2013
  • Latest release: Jan 18, 2014
  • Number of updates: 15
  • Update frequency: every 7.9 days
  • Top authors: dilana87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,834 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/favicon-notifications/favicon-notifications.php+37
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.30ms] Passed 4 tests

An overview of server-side resources used by Favicon Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.89 ▼37.03
Dashboard /wp-admin2.05 ▼1.3010.15 ▼49.14
Posts /wp-admin/edit.php2.05 ▼1.316.37 ▼42.38
Add New Post /wp-admin/post-new.php2.05 ▼3.846.21 ▼92.65
Media Library /wp-admin/upload.php2.05 ▼1.185.84 ▼22.80
Favicon /wp-admin/options-general.php?page=favicon_settings2.056.67

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: 3 new tables, 7 new options
New tables
wp_fav_notifications_unread
wp_fav_notifications_posts
wp_fav_notifications
New WordPress options
widget_recent-comments
fav_db_version
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Favicon Notifications
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14714.02 ▼0.367.51 ▲5.6839.12 ▼4.38
Dashboard /wp-admin2,212 ▲215.86 ▲1.02107.36 ▲4.0138.91 ▼5.23
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.02 ▼2.0535.20 ▲1.21
Add New Post /wp-admin/post-new.php1,519 ▼2817.62 ▼0.34637.89 ▲30.9360.01 ▲0.64
Media Library /wp-admin/upload.php1,397 ▲94.11 ▼0.1295.00 ▼2.0745.10 ▲2.87
Favicon /wp-admin/options-general.php?page=favicon_settings1,0821.9532.3725.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/favicon-notifications/favicon-notifications.php+37
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_fav_notifications_posts
    • wp_fav_notifications
    • wp_fav_notifications_unread
  • The uninstall procedure has failed, leaving 7 options in the database
    • fav_db_version
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=favicon_settings
    • > Notice in wp-content/plugins/favicon-notifications/favicon-notifications.php+46
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=favicon_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=favicon_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/favicon-notifications/favicon-notifications.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

favicon-notifications/favicon-notifications.php Passed 13 tests

Analyzing the main PHP file in "Favicon Notifications" version 0.3
53 characters long description:
Animate your favicon with animated notification badge

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,372 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41742510
PHP510566460
CSS16823379
Markdown112023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity13.50
▷ Minimum class complexity3.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.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