62% notification-customizer

Code Review | Notification Customizer

WordPress plugin Notification Customizer scored62%from 54 tests.

About plugin

  • Plugin page: notification-cust...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2018
  • Latest release: Jan 12, 2019
  • Number of updates: 71
  • Update frequency: every 0.2 days
  • Top authors: onegreenoak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /580 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.95MB] [CPU: ▼53.69ms] Passed 4 tests

This is a short check of server-side resources used by Notification Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.436.19 ▼36.24
Dashboard /wp-admin2.06 ▼1.258.50 ▼40.55
Posts /wp-admin/edit.php2.06 ▼1.307.52 ▼40.99
Add New Post /wp-admin/post-new.php2.06 ▼3.839.12 ▼96.98
Media Library /wp-admin/upload.php2.06 ▼1.178.52 ▼27.55
Plugin Update Message /wp-admin/options-general.php?page=plugin-update-message2.068.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Notification Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.28 ▼1.126.39 ▲4.2545.78 ▲2.66
Dashboard /wp-admin2,212 ▲275.83 ▼0.06106.39 ▲8.3336.23 ▼4.96
Posts /wp-admin/edit.php2,095 ▲32.03 ▲0.0336.83 ▼3.5735.11 ▲3.91
Add New Post /wp-admin/post-new.php1,536 ▲823.31 ▲4.99608.13 ▼28.4159.46 ▲12.89
Media Library /wp-admin/upload.php1,394 ▲64.18 ▼0.0394.46 ▼2.8442.48 ▼3.18
Plugin Update Message /wp-admin/options-general.php?page=plugin-update-message8641.7425.6828.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/notification-customizer/admin/class-plugin-update-message-admin.php+173
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 752 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=plugin-update-message
    • > Notice in wp-content/plugins/notification-customizer/admin/class-plugin-update-message-admin.php+173
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/notification-customizer/public/partials/plugin-update-message-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/notification-customizer/admin/partials/plugin-update-message-admin-display.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: "onegreenoak.com"
You can look at the official readme.txt

notification-customizer/plugin-update-message.php 85% from 13 tests

"Notification Customizer" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("notification-customizer.php" instead of "plugin-update-message.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin276 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13171572259
JavaScript295417
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin