72% vanilla-bean-slack-hooker

Code Review | Vanilla Bean Slack Hooker

WordPress plugin Vanilla Bean Slack Hooker scored72%from 54 tests.

About plugin

  • Plugin page: vanilla-bean-slac...
  • Plugin version: 5.2.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2015
  • Latest release: Aug 15, 2023
  • Number of updates: 113
  • Update frequency: every 24.7 days
  • Top authors: vsmash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,960 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Vanilla Bean Slack Hooker
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 631.25ms on /wp-admin/admin.php?page=vanillabeans-settings)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.84 ▼2.51
Dashboard /wp-admin3.48 ▲0.1849.27 ▼2.72
Posts /wp-admin/edit.php3.54 ▲0.1851.57 ▲0.38
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.81 ▼5.70
Media Library /wp-admin/upload.php3.35 ▲0.1238.90 ▼1.12
Vanilla Beans /wp-admin/admin.php?page=vanillabeans-settings3.42631.25
Slack Hooker /wp-admin/admin.php?page=vanilla-bean-slack-hooker3.4636.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Vanilla Bean Slack Hooker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.37 ▼1.008.38 ▲6.5542.89 ▲0.38
Dashboard /wp-admin2,209 ▲295.53 ▲0.0089.49 ▼1.3775.02 ▲31.81
Posts /wp-admin/edit.php2,123 ▲201.96 ▼0.0335.75 ▼5.3035.12 ▼2.36
Add New Post /wp-admin/post-new.php1,702 ▲16721.71 ▲3.05770.65 ▲125.2552.72 ▼18.80
Media Library /wp-admin/upload.php1,429 ▲294.12 ▼0.0196.83 ▼3.7175.18 ▲28.98
Vanilla Beans /wp-admin/admin.php?page=vanillabeans-settings1,4782.1224.9832.32
Slack Hooker /wp-admin/admin.php?page=vanilla-bean-slack-hooker2,6484.37116.7348.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/vanilla-bean-slack-hooker/admin/partials/vanilla-bean-slack-hooker-admin-display.php
    • > /wp-content/plugins/vanilla-bean-slack-hooker/public/partials/vanilla-bean-slack-hooker-public-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vanilla-bean-slack-hooker/admin/class-vanilla-bean-slack-hooker-admin.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'SLACKHOOKER_DIRexopite-simple-options/exopite-simple-options-framework-class.php' (include_path='.:/usr/share/php') in wp-content/plugins/vanilla-bean-slack-hooker/includes/class-vanilla-bean-slack-hooker.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VanillaBeans\\SlackHooker\\add_action() in wp-content/plugins/vanilla-bean-slack-hooker/includes/notifier.php:34
    • > PHP Warning
      Use of undefined constant SLACKHOOKER_DIR - assumed 'SLACKHOOKER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/vanilla-bean-slack-hooker/includes/class-vanilla-bean-slack-hooker.php on line 3
    • > PHP Warning
      require_once(SLACKHOOKER_DIRexopite-simple-options/exopite-simple-options-framework-class.php): failed to open stream: No such file or directory in wp-content/plugins/vanilla-bean-slack-hooker/includes/class-vanilla-bean-slack-hooker.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vanilla-bean-slack-hooker
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vanilla-bean-slack-hooker
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vanilla-bean-slack-hooker
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vanilla-bean-slack-hooker
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === vanilla-bean-slack-hooker === )
Please take inspiration from this readme.txt

vanilla-bean-slack-hooker/vanilla-bean-slack-hooker.php Passed 13 tests

The main file in "Vanilla Bean Slack Hooker" v. 5.2.16 serves as a complement to information provided in readme.txt and as the entry point to the plugin
83 characters long description:
Integrate webhooks into your site for notifications via Slack, Mattermost or others

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin38,333 lines of code in 495 files:
LanguageFilesBlank linesComment linesLines of code
JSON10015,622
JavaScript4211,5798,6817,903
CSS15623045,414
PHP542,0851,9215,319
SVG4124,075

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity17.64
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes47
▷ Abstract classes12.13%
▷ Concrete classes4697.87%
▷ Final classes00.00%
Methods231
▷ Static methods3916.88%
▷ Public methods20488.31%
▷ Protected methods156.49%
▷ Private methods125.19%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants7
▷ Global constants228.57%
▷ Class constants571.43%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
exopite-simple-options/assets/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vicon32.png2.21KB1.37KB▼ 38.29%
exopite-simple-options/assets/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
exopite-simple-options/assets/images/ui-bg_inset-soft_95_fef1ec_1x100.png0.12KB0.16KB0.00%
exopite-simple-options/assets/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%