74% stream

Code Review | Stream

WordPress plugin Stream scored74%from 54 tests.

About plugin

  • Plugin page: stream
  • Plugin version: 3.10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Oct 9, 2023
  • Number of updates: 167
  • Update frequency: every 21.5 days
  • Top authors: fjarrett (65.87%)kasparsd (23.35%)lukecarbis (8.98%)schlessera (1.8%)Desertsnowman (1.8%)

Code review

54 tests

User reviews

76 reviews

Install metrics

80,000+ active /1,331,452 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.85MB] [CPU: ▲17.18ms] Passed 4 tests

A check of server-side resources used by Stream
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.97 ▲2.5164.80 ▲27.41
Dashboard /wp-admin6.27 ▲2.9363.02 ▼0.72
Posts /wp-admin/edit.php6.33 ▲2.9771.71 ▲29.91
Add New Post /wp-admin/post-new.php8.87 ▲2.99105.10 ▲14.69
Media Library /wp-admin/upload.php6.20 ▲2.9758.27 ▲27.33
Alerts /wp-admin/edit.php?post_type=wp_stream_alerts6.2452.84
Settings /wp-admin/admin.php?page=wp_stream_settings6.2652.77
Stream /wp-admin/admin.php?page=wp_stream6.8064.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Stream
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8714.60 ▲0.041.62 ▲0.1236.46 ▼3.02
Dashboard /wp-admin2,240 ▲595.80 ▲0.0986.33 ▼26.0337.13 ▼5.98
Posts /wp-admin/edit.php2,145 ▲452.23 ▲0.2744.17 ▲6.6837.81 ▲8.19
Add New Post /wp-admin/post-new.php1,565 ▲2722.10 ▲3.74654.69 ▲17.4561.99 ▼1.30
Media Library /wp-admin/upload.php1,448 ▲484.39 ▲0.15100.35 ▲5.2143.68 ▲3.21
Alerts /wp-admin/edit.php?post_type=wp_stream_alerts1,0772.5847.7034.90
Settings /wp-admin/admin.php?page=wp_stream_settings1,4912.4949.4129.18
Stream /wp-admin/admin.php?page=wp_stream1,9423.1670.3535.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_stream
    • wp_stream_meta
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/stream/connectors/class-connector-taxonomies.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/stream/connectors/class-connector-blogs.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Alert_Type' not found in wp-content/plugins/stream/alerts/class-alert-type-none.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\List_Table' not found in wp-content/plugins/stream/classes/class-preview-list-table.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Exporter' not found in wp-content/plugins/stream/exporters/class-exporter-json.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Alert_Trigger' not found in wp-content/plugins/stream/alerts/class-alert-trigger-action.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/stream/connectors/class-connector-media.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Alert_Type' not found in wp-content/plugins/stream/alerts/class-alert-type-die.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/stream/connectors/class-connector-mercator.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/stream/connectors/class-connector-edd.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: track, logs, activity, wp stream, stream

stream/stream.php 92% from 13 tests

The main PHP script in "Stream" version 3.10.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 289 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin30,938 lines of code in 206 files:
LanguageFilesBlank linesComment linesLines of code
PHP683,0948,94915,053
JavaScript1202,69782011,904
PO File18339872,294
CSS9245491,403
Markdown3880130
JSON10077
YAML10064
SVG30013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity31.98
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes61
▷ Abstract classes46.56%
▷ Concrete classes5793.44%
▷ Final classes00.00%
Methods847
▷ Static methods263.07%
▷ Public methods82196.93%
▷ Protected methods101.18%
▷ Private methods161.89%
Functions46
▷ Named functions1328.26%
▷ Anonymous functions3371.74%
Constants34
▷ Global constants12.94%
▷ Class constants3397.06%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.24MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ui/stream-icons/menuicon-sprite-2x.png2.06KB0.88KB▼ 57.38%
assets/screenshot-3.png29.50KB29.57KB0.00%
assets/screenshot-1.png64.28KB65.70KB0.00%
assets/icon-128x128.png6.02KB3.27KB▼ 45.68%
ui/stream-icons/wp-cli.png2.42KB1.77KB▼ 26.80%