84% rock-the-slackbot

Code Review | Rock The Slackbot

WordPress plugin Rock The Slackbot scored84%from 54 tests.

About plugin

  • Plugin page: rock-the-slackbot
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 3, 2015
  • Latest release: Jan 10, 2017
  • Number of updates: 31
  • Update frequency: every 14.0 days
  • Top authors: bamadesigner (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

200+ active /5,822 total downloads

Benchmarks

Plugin footprint 83% 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.05MB] [CPU: ▼4.96ms] Passed 4 tests

Server-side resources used by Rock The Slackbot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.48 ▼2.89
Dashboard /wp-admin3.37 ▲0.0344.43 ▼13.65
Posts /wp-admin/edit.php3.42 ▲0.0745.84 ▲1.03
Add New Post /wp-admin/post-new.php5.95 ▲0.0788.21 ▼4.34
Media Library /wp-admin/upload.php3.29 ▲0.0736.98 ▲4.00
Rock The Slackbot /wp-admin/tools.php?page=rock-the-slackbot3.2734.71

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Rock The Slackbot
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.44 ▲0.061.52 ▼0.4537.60 ▼9.94
Dashboard /wp-admin2,202 ▲225.62 ▼0.0281.41 ▼7.6737.96 ▼6.47
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0139.32 ▲2.9435.85 ▲0.08
Add New Post /wp-admin/post-new.php1,528 ▲223.22 ▲0.08635.81 ▼93.9852.70 ▼2.01
Media Library /wp-admin/upload.php1,404 ▲14.24 ▲0.0398.39 ▼1.6542.02 ▼3.57
Rock The Slackbot /wp-admin/tools.php?page=rock-the-slackbot1,0922.3344.3966.26

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/rock-the-slackbot/includes/admin.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rock-the-slackbot/includes/hooks.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
6 plugin tags: team, slackbot, collaboration, notification, slack...

rock-the-slackbot/rock-the-slackbot.php Passed 13 tests

The entry point to "Rock The Slackbot" version 1.1.2 is a PHP file that has certain tags in its header comment area
114 characters long description:
Helps you stay on top of changes by sending notifications straight to you and your team inside your Slack account.

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
No dangerous file extensions were detected2,801 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,0171,6232,799
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of 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.52
Average class complexity131.00
▷ Minimum class complexity18.00
▷ Maximum class complexity261.00
Average method complexity8.88
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods66
▷ Static methods34.55%
▷ Public methods5177.27%
▷ Protected methods23.03%
▷ Private methods1319.70%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wordpress-icon-emoji.png8.80KB4.31KB▼ 51.00%
assets/images/slack-logo.png7.71KB3.76KB▼ 51.27%