90% slashpress

Code Review | SlashPress

WordPress plugin SlashPress scored90%from 54 tests.

About plugin

  • Plugin page: slashpress
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Feb 17, 2023
  • Number of updates: 8
  • Update frequency: every 128.8 days
  • Top authors: lev0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /479 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.18ms] Passed 4 tests

This is a short check of server-side resources used by SlashPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.78 ▼10.87
Dashboard /wp-admin3.42 ▲0.1253.64 ▲0.60
Posts /wp-admin/edit.php3.48 ▲0.1149.48 ▼1.61
Add New Post /wp-admin/post-new.php6.01 ▲0.1198.95 ▲11.45
Media Library /wp-admin/upload.php3.35 ▲0.1136.90 ▲3.17
SlashPress /wp-admin/options-general.php?page=slashpress-admin3.3131.03

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SlashPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.141.71 ▼0.3241.81 ▼2.67
Dashboard /wp-admin2,202 ▲345.65 ▲0.1392.10 ▼0.6541.66 ▼7.22
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0140.12 ▲3.4934.93 ▼1.82
Add New Post /wp-admin/post-new.php1,545 ▲1918.37 ▼4.64624.02 ▲26.4476.88 ▲6.24
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.11105.78 ▼2.2945.16 ▼2.19
SlashPress /wp-admin/options-general.php?page=slashpress-admin9252.0024.4732.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: slack, mattermost, chatops, slash commands

slashpress/slashpress.php Passed 13 tests

"SlashPress" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
Conduit between plugins in this WordPress installation, and your custom-defined slash commands in Mattermost or Slack chat services.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected529 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43144529

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions00.00%
▷ Anonymous functions15100.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ 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
No PNG images were found in this plugin