78% dorzki-notifications-to-slack

Code Review | Slack Notifications by dorzki

WordPress plugin Slack Notifications by dorzki scored78%from 54 tests.

About plugin

  • Plugin page: dorzki-notificati...
  • Plugin version: 2.0.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2015
  • Latest release: Dec 17, 2019
  • Number of updates: 52
  • Update frequency: every 29.6 days
  • Top authors: DorZki (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active /42,668 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.60MB] [CPU: ▲3.59ms] Passed 4 tests

A check of server-side resources used by Slack Notifications by dorzki
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6343.12 ▲4.70
Dashboard /wp-admin3.95 ▲0.6454.09 ▲7.85
Posts /wp-admin/edit.php4.00 ▲0.6551.18 ▲6.34
Add New Post /wp-admin/post-new.php6.47 ▲0.5896.79 ▼1.49
Media Library /wp-admin/upload.php3.79 ▲0.5639.40 ▲4.81
Support /wp-admin/admin.php?page=slack-notifications-support3.7938.87
General /wp-admin/admin.php?page=slack-notifications-general3.7935.52
Notifications /wp-admin/admin.php?page=slack-notifications-notifications3.7940.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
can_compress_scripts
slack_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
slack_test_integration
slack_notifications

Browser metrics Passed 4 tests

A check of browser resources used by Slack Notifications by dorzki
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22914.83 ▲0.561.74 ▲0.0742.76 ▲0.65
Dashboard /wp-admin2,378 ▲1876.42 ▲0.39133.43 ▲29.8942.32 ▲1.08
Posts /wp-admin/edit.php2,284 ▲1923.33 ▲1.3149.74 ▲13.3332.07 ▼0.75
Add New Post /wp-admin/post-new.php1,547 ▲2823.14 ▼0.23630.51 ▼71.1735.53 ▼26.23
Media Library /wp-admin/upload.php1,420 ▲324.11 ▼0.1582.32 ▼29.4042.17 ▼4.72
Support /wp-admin/admin.php?page=slack-notifications-support1,0363.0739.5825.92
General /wp-admin/admin.php?page=slack-notifications-general1,0703.0443.7432.68
Notifications /wp-admin/admin.php?page=slack-notifications-notifications1,3203.2040.1425.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • slack_test_integration
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dorzki-notifications-to-slack/templates/settings-footer.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-general.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dorzki-notifications-to-slack/templates/partials/notification.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-header.php:4
    • > PHP Fatal error
      require(): Failed opening required 'SLACK_NOTIFICATIONS_PATHtemplates/partials/notification.php' (include_path='.:/usr/share/php') in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-notifications.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Slack_Notifications\\esc_html_e() in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-support.php:6
    • > PHP Warning
      require(SLACK_NOTIFICATIONS_PATHtemplates/partials/notification.php): failed to open stream: No such file or directory in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-notifications.php on line 29
    • > PHP Warning
      Use of undefined constant SLACK_NOTIFICATIONS_SLUG - assumed 'SLACK_NOTIFICATIONS_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-header.php on line 1
    • > PHP Warning
      Use of undefined constant SLACK_NOTIFICATIONS_PATH - assumed 'SLACK_NOTIFICATIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dorzki-notifications-to-slack/templates/settings-notifications.php on line 29

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: realtime, slack, updates, notifications

dorzki-notifications-to-slack/slack-notifications.php 92% from 13 tests

The primary PHP file in "Slack Notifications by dorzki" version 2.0.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("dorzki-notifications-to-slack.php" instead of "slack-notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,527 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP279741,0522,520
SVG5005
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.89
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods87
▷ Static methods1618.39%
▷ Public methods7485.06%
▷ Protected methods22.30%
▷ Private methods1112.64%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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