68% social-streams

Code Review | Social Streams

WordPress plugin Social Streams scored 68% from 54 tests.

About plugin

  • Plugin page: social-streams
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2015
  • Latest release: Feb 26, 2015
  • Number of updates: 12
  • Update frequency: every 1.3 days
  • Top authors: steverio (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

60+ active / 8,679 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
Install script ran successfully

Server metrics [RAM: ▲0.70MB] [CPU: ▲1.05ms] Passed 4 tests

A check of server-side resources used by Social Streams
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7350.42 ▲11.13
Dashboard /wp-admin4.02 ▲0.7155.41 ▲4.39
Posts /wp-admin/edit.php4.08 ▲0.7250.88 ▲0.72
Add New Post /wp-admin/post-new.php6.54 ▲0.6591.54 ▼6.52
Media Library /wp-admin/upload.php3.95 ▲0.7240.92 ▲5.60

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 93 new files
Database: 2 new tables, 7 new options
New tables
wp_ss_posts
wp_ss_postmeta
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
socialstreams_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Social Streams: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲26214.37 ▼0.1923.84 ▲22.1243.86 ▲3.38
Dashboard /wp-admin2,212 ▲244.88 ▼0.96100.05 ▼13.7579.91 ▲38.65
Posts /wp-admin/edit.php2,107 ▲182.02 ▲0.0035.88 ▼4.2232.27 ▼3.89
Add New Post /wp-admin/post-new.php1,530 ▼323.22 ▼0.13722.37 ▲63.8837.93 ▼31.84
Media Library /wp-admin/upload.php1,403 ▲154.20 ▲0.02101.95 ▼6.4373.23 ▲30.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_ss_postmeta
    • wp_ss_posts
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • socialstreams_version
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/social-streams/src/views/socialstreams.php
    • > /wp-content/plugins/social-streams/social-streams.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/social-streams/templates/template-socialstream.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function classes() on null in wp-content/plugins/social-streams/src/views/socialstream-post.php:1
    • > PHP Notice
      Undefined variable: ssPost in wp-content/plugins/social-streams/src/views/socialstream-post.php on line 1
    • > PHP Notice
      Undefined variable: socialStreams in wp-content/plugins/social-streams/src/views/socialstreams.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/social-streams/templates/template-socialstream-fullscreen.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-streams/src/php/SocialStreams_Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/social-streams/src/php/WpCliCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SocialStreams\\JsonAPI\\Module' not found in wp-content/plugins/social-streams/src/php/JsonAPI/Module/Batch.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: moderation, social content, social stream, instagram, social...

social-streams/social-streams.php Passed 13 tests

The main PHP file in "Social Streams" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
14 characters long description:
Social Streams

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
Success! There were no dangerous files found in this plugin24,252 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript213,2743,28616,308
PHP352,0111,8894,263
CSS91302392,770
JSON100623
HTML1172263
SVG10025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity28.38
▷ Minimum class complexity1.00
▷ Maximum class complexity251.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods175
▷ Static methods3017.14%
▷ Public methods16896.00%
▷ Protected methods00.00%
▷ Private methods74.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.29MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/images/logos/socialstreams_logo.png17.13KB5.56KB▼ 67.54%
assets/screenshot-6.png38.86KB11.55KB▼ 70.29%
src/images/logos/socialstreams_inlinelogo.png8.50KB2.93KB▼ 65.48%
src/images/transparents/post-transparent.png0.91KB0.09KB▼ 89.57%
src/images/logos/logo-200x200.png6.57KB3.28KB▼ 50.06%