10% notify-wp

Code Review | notify-wp

WordPress plugin notify-wp scored10%from 54 tests.

About plugin

  • Plugin page: notify-wp
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2015
  • Latest release: Aug 13, 2015
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: ShunsukeHayashi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /650 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/notify-wp/inc/api.class.php+10
    Non-static method Notify_Plugin::get_options() should not be called statically

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.55ms] Passed 4 tests

A check of server-side resources used by notify-wp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.37 ▼35.83
Dashboard /wp-admin2.09 ▼1.216.01 ▼40.40
Posts /wp-admin/edit.php2.09 ▼1.265.82 ▼42.35
Add New Post /wp-admin/post-new.php2.09 ▼3.796.08 ▼95.63
Media Library /wp-admin/upload.php2.09 ▼1.145.47 ▼28.58
notify /wp-admin/options-general.php?page=notify-for-wordpress2.095.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for notify-wp
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.52 ▼0.881.70 ▼0.3139.50 ▼7.87
Dashboard /wp-admin2,213 ▲254.88 ▲0.0099.31 ▼5.1938.49 ▼5.10
Posts /wp-admin/edit.php2,096 ▲102.00 ▲0.0439.59 ▼1.3735.14 ▼1.82
Add New Post /wp-admin/post-new.php1,536 ▲1423.16 ▼0.35657.99 ▲9.5359.42 ▲9.36
Media Library /wp-admin/upload.php1,395 ▲104.14 ▼0.0596.60 ▼1.2843.27 ▲1.88
notify /wp-admin/options-general.php?page=notify-for-wordpress8632.0526.3669.34

Uninstaller [IO: ▲0.00MB] [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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/notify-wp/inc/api.class.php+10
    Non-static method Notify_Plugin::get_options() should not be called statically
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • notify_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Deprecated in wp-content/plugins/notify-wp/inc/api.class.php+10
    Non-static method Notify_Plugin::get_options() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Notice in wp-content/plugins/notify-wp/template/index.php+45
    Trying to get property 'notification_token' of non-object
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Notice in wp-content/plugins/notify-wp/template/index.php+5
    Trying to get property 'notification_message' of non-object
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Notice in wp-content/plugins/notify-wp/template/index.php+9
    Trying to get property 'notification_embed' of non-object
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Notice in wp-content/plugins/notify-wp/template/index.php+10
    Trying to get property 'notification_type_post' of non-object
    • > GET request to /wp-admin/options-general.php?page=notify-for-wordpress
    • > Notice in wp-content/plugins/notify-wp/template/index.php+11
    Trying to get property 'notification_type_page' of non-object

SRP 50% 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notify-wp/inc/plugin.class.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/notify-wp/template/index.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

notify-wp/notify-wordpress.php 92% from 13 tests

This is the main PHP file of "notify-wp" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("notify-wp.php" instead of "notify-wordpress.php")

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 plugin261 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44917241
Markdown18017
CSS1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.47MB with 0.32MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/input.png156.02KB34.99KB▼ 77.57%
img/finish.png284.22KB105.91KB▼ 62.74%
img/where.png39.80KB13.09KB▼ 67.11%