68% social-stream-design

Code Review | WP Social Stream Designer

WordPress plugin WP Social Stream Designer scored68%from 54 tests.

About plugin

  • Plugin page: social-stream-design
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2021
  • Latest release: Apr 5, 2023
  • Number of updates: 11
  • Update frequency: every 71.2 days
  • Top authors: solwininfotech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,672 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲8.98ms] Passed 4 tests

Analyzing server-side resources used by WP Social Stream Designer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8255.37 ▲16.18
Dashboard /wp-admin3.99 ▲0.6860.91 ▲9.87
Posts /wp-admin/edit.php4.04 ▲0.6857.93 ▲4.68
Add New Post /wp-admin/post-new.php6.51 ▲0.6299.29 ▲7.77
Media Library /wp-admin/upload.php3.85 ▲0.6250.20 ▲13.59
Social Feeds /wp-admin/admin.php?page=social-stream-designer-social-feed-layouts3.8650.46
Social Authentication /wp-admin/admin.php?page=social-stream-designer-settings3.9150.73
Add New Layout /wp-admin/admin.php?page=social-stream-designer-add-layouts3.8344.72
Add Social Feed /wp-admin/admin.php?page=social-stream-designer-social-feed4.0751.66
Layouts /wp-admin/admin.php?page=social-stream-designer-layouts3.8342.87

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 93 new files
Database: 3 new tables, 7 new options
New tables
wp_ssd_feeds
wp_ssd_shortcodes
wp_ssd_feed_posts
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
ssd_version
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Social Stream Designer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲26013.82 ▼0.5517.67 ▲16.0680.87 ▲33.31
Dashboard /wp-admin2,248 ▲685.66 ▼0.0287.90 ▼7.4440.03 ▼0.22
Posts /wp-admin/edit.php2,147 ▲441.98 ▲0.0036.87 ▲1.0834.45 ▼2.66
Add New Post /wp-admin/post-new.php1,567 ▲4123.69 ▲0.31674.30 ▼28.6052.24 ▼6.24
Media Library /wp-admin/upload.php1,447 ▲504.18 ▼0.0699.34 ▼1.9645.85 ▲1.40
Social Feeds /wp-admin/admin.php?page=social-stream-designer-social-feed-layouts1,2483.5575.0228.25
Social Authentication /wp-admin/admin.php?page=social-stream-designer-settings1,5273.5971.7990.15
Add New Layout /wp-admin/admin.php?page=social-stream-designer-add-layouts9,0696.05311.61108.06
Add Social Feed /wp-admin/admin.php?page=social-stream-designer-social-feed1,8614.2568.4739.08
Layouts /wp-admin/admin.php?page=social-stream-designer-layouts1,2393.9348.3528.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_ssd_feeds
    • wp_ssd_feed_posts
    • wp_ssd_shortcodes
  • Zombie WordPress options detected upon uninstall: 7 options
    • ssd_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=social-stream-designer-layouts
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 85× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'post_status' of non-object in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 11
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/social-stream-design/admin/assets/social-stream-add-social-feed.php:10
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 27
    • > PHP Notice
      Trying to get property 'post_user_screen_name' of non-object in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 25
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 21
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 36
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 29
    • > PHP Notice
      Undefined variable: feeds in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 31
    • > PHP Notice
      Trying to get property 'post_plays_count' of non-object in wp-content/plugins/social-stream-design/include/social-stream-layout.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: Please take inspiration from this readme.txt

social-stream-design/social-stream-design.php Passed 13 tests

"WP Social Stream Designer" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
To create and design social streams in more pretty, attractive and colorful way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin16,706 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP252061,3437,626
SVG3003,825
CSS565703,439
JavaScript968151,816

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity67.62
▷ Minimum class complexity22.00
▷ Maximum class complexity218.00
Average method complexity9.41
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods103
▷ Static methods1413.59%
▷ Public methods9390.29%
▷ Protected methods87.77%
▷ Private methods21.94%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
19 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/No_available_image.png27.59KB16.32KB▼ 40.84%
admin/css/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
images/close-icon.png46.32KB0.13KB▼ 99.73%
images/style-3.png14.79KB8.55KB▼ 42.15%
admin/css/images/ui-icons_777620_256x240.png4.52KB4.18KB▼ 7.58%