83% autovisie-slack-notifications

Code Review | Autovisie Slack Notifications

WordPress plugin Autovisie Slack Notifications scored83%from 54 tests.

About plugin

  • Plugin page: autovisie-slack-n...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Jun 24, 2016
  • Latest release: Jun 24, 2016
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: melvr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 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.07MB] [CPU: ▼6.84ms] Passed 4 tests

A check of server-side resources used by Autovisie Slack Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.25 ▼2.36
Dashboard /wp-admin3.38 ▲0.0445.67 ▼12.54
Posts /wp-admin/edit.php3.49 ▲0.1448.73 ▲1.20
Add New Post /wp-admin/post-new.php5.96 ▲0.0882.89 ▼13.66
Media Library /wp-admin/upload.php3.30 ▲0.0840.20 ▲6.18
Slack Notification Settings /wp-admin/options-general.php?page=av-slack-notifications3.2728.90

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Autovisie Slack Notifications
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.52 ▼0.783.93 ▲1.9637.91 ▼3.86
Dashboard /wp-admin2,204 ▲135.79 ▼0.11101.04 ▲0.5440.08 ▼3.54
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0139.84 ▲6.2534.41 ▲0.05
Add New Post /wp-admin/post-new.php1,517 ▲317.53 ▼0.18678.01 ▼5.9153.78 ▲7.37
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.09108.40 ▲3.0446.75 ▼0.67
Slack Notification Settings /wp-admin/options-general.php?page=av-slack-notifications7952.0323.6726.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/autovisie-slack-notifications/admin/partials/av-slack-notifications-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Menu), #2 (Settings), #3 (Slack configuration), #4 (Incoming WebHooks), #5 (Incoming WebHooks settings), #6 (Example notification (white part in the url we removed ourself))
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === autovisie-slack-notifications === )
The official readme.txt is a good inspiration

autovisie-slack-notifications/av-slack-notifications.php 85% from 13 tests

The main file in "Autovisie Slack Notifications" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("autovisie-slack-notifications.php" instead of "av-slack-notifications.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin318 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11134571289
PO File16729

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2264.71%
▷ Protected methods823.53%
▷ Private methods411.76%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png38.31KB15.59KB▼ 59.31%
screenshot-1.png6.62KB4.51KB▼ 31.93%
screenshot-4.png59.08KB21.01KB▼ 64.44%
screenshot-5.png42.96KB20.17KB▼ 53.06%
screenshot-3.png15.14KB7.71KB▼ 49.07%