78% wp-down-slack-alert

Code Review | WP Down Slack Alert

WordPress plugin WP Down Slack Alert scored78%from 54 tests.

About plugin

  • Plugin page: wp-down-slack-alert
  • Plugin version: 0.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2019
  • Latest release: Nov 23, 2022
  • Number of updates: 26
  • Update frequency: every 41.4 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,631 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.78ms] Passed 4 tests

A check of server-side resources used by WP Down Slack Alert
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1941.35 ▼4.82
Dashboard /wp-admin3.49 ▲0.1950.41 ▲1.85
Posts /wp-admin/edit.php3.61 ▲0.2552.60 ▲4.68
Add New Post /wp-admin/post-new.php6.07 ▲0.1985.78 ▼20.81
Media Library /wp-admin/upload.php3.41 ▲0.1940.44 ▲5.80
Slack Alert /wp-admin/tools.php?page=settings-slack-notification3.4042.80

Server storage [IO: ▲0.75MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (45.27KB) outside of "wp-content/plugins/wp-down-slack-alert/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/wp-down-slack-alert-worker.php
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
wpdsa_version
widget_theysaidso_widget
widget_recent-comments
settings_slack_notification_disable_email
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WP Down Slack Alert: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.37 ▼1.424.36 ▲2.5044.23 ▼8.60
Dashboard /wp-admin2,210 ▲224.88 ▼1.02108.44 ▲1.9840.15 ▲0.64
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0439.80 ▲3.5035.72 ▲1.13
Add New Post /wp-admin/post-new.php1,537 ▼123.19 ▲5.06608.49 ▼32.1349.59 ▼1.84
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0097.82 ▼2.0842.10 ▼2.54
Slack Alert /wp-admin/tools.php?page=settings-slack-notification1,5864.1980.4571.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • settings_slack_notification_disable_email
    • widget_recent-comments
    • widget_recent-posts
    • wpdsa_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-down-slack-alert/wp-down-slack-alert.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-down-slack-alert/mu-plugin-template/wp-down-slack-alert-worker.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: notification, alert, crash, break, slack...

wp-down-slack-alert/wp-down-slack-alert.php Passed 13 tests

Analyzing the main PHP file in "WP Down Slack Alert" version 0.4.1
93 characters long description:
Connect WordPress Recovery Mode to a your Slack team to receive alerts when websites are down

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,017 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38874955
JavaScript17444
CSS10018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.68MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/config-5.png85.58KB24.75KB▼ 71.08%
images/config-1.png98.40KB32.04KB▼ 67.44%
images/config-4.png118.35KB37.40KB▼ 68.40%
images/config-7.png114.92KB33.87KB▼ 70.52%
images/config-6.png78.31KB20.90KB▼ 73.31%