78% hey-notify

Code Review | Hey Notify

WordPress plugin Hey Notify scored 78% from 54 tests.

About plugin

  • Plugin page: hey-notify
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.8
  • WordPress version: 5.8.1
  • First release: Jul 23, 2020
  • Latest release: Jul 16, 2021
  • Number of updates: 18
  • Update frequency: every 19.9 days
  • Top authors: firetree (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 1,738 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲2.41MB] [CPU: ▼124.13ms] 75% from 4 tests

A check of server-side resources used by Hey Notify
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 5,049.57ms on /wp-admin/edit.php?post_type=hey_notify&page=add-ons)
PageMemory (MB)CPU Time (ms)
Home /5.19 ▲2.4860.84 ▲36.16
Dashboard /wp-admin5.46 ▲2.4076.00 ▲22.75
Posts /wp-admin/edit.php5.58 ▲2.4771.64 ▲21.05
Add New Post /wp-admin/post-new.php7.82 ▲2.39125.30 ▼554.92
Media Library /wp-admin/upload.php5.38 ▲2.3854.80 ▲14.59
Add-ons /wp-admin/edit.php?post_type=hey_notify&page=add-ons5.415,049.57
All Notifications /wp-admin/edit.php?post_type=hey_notify5.4664.95
Add New /wp-admin/post-new.php?post_type=hey_notify5.4974.31
Settings /wp-admin/edit.php?post_type=hey_notify&page=settings5.4360.06

Server storage [IO: ▲8.65MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 499 new files
Database: no new tables, 2 new options
New WordPress options
hey_notify_custom_post_types
hey_notify_version

Browser metrics Passed 4 tests

Checking browser requirements for Hey Notify
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,102 ▲53020.67 ▲5.129.69 ▼2.2649.83 ▼0.24
Dashboard /wp-admin3,371 ▲44010.44 ▲4.53219.35 ▲54.49117.81 ▼4.70
Posts /wp-admin/edit.php3,153 ▲4146.73 ▲4.03118.42 ▲48.9488.53 ▼9.26
Add New Post /wp-admin/post-new.php1,834 ▲24019.35 ▲0.54429.86 ▲19.55141.94 ▲19.32
Media Library /wp-admin/upload.php1,999 ▲1927.16 ▲2.12161.29 ▼7.00131.83 ▲4.45
Add-ons /wp-admin/edit.php?post_type=hey_notify&page=add-ons1,4506.32111.1075.09
All Notifications /wp-admin/edit.php?post_type=hey_notify1,8406.62117.6569.74
Add New /wp-admin/post-new.php?post_type=hey_notify2,7648.70214.3094.98
Settings /wp-admin/edit.php?post_type=hey_notify&page=settings1,8868.23164.8694.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 options in the database
    • hey_notify_custom_post_types
    • hey_notify_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 112× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Provider/Container_Condition_Provider.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Datastore' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Datastore/Key_Value_Datastore.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Field/Footer_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Carbon_Fields' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/config.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Widget/Widget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Datastore' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Datastore/Empty_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Scalar_Comparer.php:7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/hey-notify/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: microsoft teams, email, alert, ninja forms, gravity forms...

hey-notify/hey-notify.php Passed 13 tests

Analyzing the main PHP file in "Hey Notify" version 1.4.2
45 characters long description:
Get notified when things happen in WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin30,824 lines of code in 442 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1725,1848,44312,940
PHP1813,2447,70211,725
PO File268191,0202,202
Sass4833501,753
CSS73231,1391,650
JSON400435
Markdown4380119

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.14
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces33
Interfaces5
Traits0
Classes141
▷ Abstract classes117.80%
▷ Concrete classes13092.20%
▷ Final classes10.77%
Methods996
▷ Static methods10010.04%
▷ Public methods81381.63%
▷ Protected methods16616.67%
▷ Private methods171.71%
Functions135
▷ Named functions5540.74%
▷ Anonymous functions8059.26%
Constants32
▷ Global constants928.12%
▷ Class constants2371.88%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/services/email.png5.46KB2.08KB▼ 61.88%
images/services/discord.png6.16KB2.66KB▼ 56.81%
images/services/microsoft_teams.png11.80KB3.02KB▼ 74.38%
images/services/slack.png4.88KB2.53KB▼ 48.26%