62% wp-slack-logbot

Code Review | WP Slack Logbot

WordPress plugin WP Slack Logbot scored 62% from 54 tests.

About plugin

  • Plugin page: wp-slack-logbot
  • Plugin version: 1.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9+
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Jan 12, 2019
  • Number of updates: 35
  • Update frequency: every 1.9 days
  • Top authors: ryotsun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 759 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.52MB] [CPU: ▲539.99ms] 50% from 4 tests

A check of server-side resources used by WP Slack Logbot
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 775.17ms on /wp-admin/options-general.php?page=wp-slack-logbot/admin/class-slack-logbot-admin.php)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 539.99ms on /wp-admin/options-general.php?page=wp-slack-logbot/admin/class-slack-logbot-admin.php)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.21309.69 ▲269.33
Dashboard /wp-admin3.49 ▲0.19793.95 ▲744.30
Posts /wp-admin/edit.php3.54 ▲0.18795.25 ▲746.49
Add New Post /wp-admin/post-new.php3.30 ▼2.58505.13 ▲399.84
Media Library /wp-admin/upload.php3.35 ▲0.12782.71 ▲748.71
WP Slack Logbot /wp-admin/options-general.php?page=wp-slack-logbot/admin/class-slack-logbot-admin.php3.32775.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_slack_logbot
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
slack_logbot_version

Browser metrics Passed 4 tests

A check of browser resources used by WP Slack Logbot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4614.73 ▲0.091.70 ▼0.5441.42 ▼4.23
Dashboard /wp-admin2,222 ▲315.87 ▼0.0493.80 ▼10.6138.77 ▼5.14
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0233.24 ▼0.6733.66 ▼3.24
Add New Post /wp-admin/post-new.php1,546 ▲420.84 ▲2.46619.90 ▼5.4256.15 ▲2.04
Media Library /wp-admin/upload.php1,401 ▲134.23 ▲0.06104.68 ▲10.1948.84 ▲2.26
WP Slack Logbot /wp-admin/options-general.php?page=wp-slack-logbot/admin/class-slack-logbot-admin.php7932.1824.1324.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WP_Slack_Logbot' not found
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_slack_logbot
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • slack_logbot_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_slack_logbot\\register_activation_hook() in wp-content/plugins/wp-slack-logbot/class-wp-slack-logbot.php:64

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in wp-slack-logbot/assets to your readme.txt
  • Tested up to: Invalid version format
  • Donate link: Please fix this invalid url: ""
  • License uri: Please fix this invalid url: ""
Please take inspiration from this readme.txt

wp-slack-logbot/class-wp-slack-logbot.php 92% from 13 tests

The entry point to "WP Slack Logbot" version 1.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-slack-logbot.php" instead of "class-wp-slack-logbot.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
Good job! No executable or dangerous file extensions detected509 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6104310466
PO File1141443

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods619.35%
▷ Public methods2064.52%
▷ Protected methods00.00%
▷ Private methods1135.48%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin