68% saragna-social-stream

Code Review | Saragna - Social Stream WordPress

WordPress plugin Saragna - Social Stream WordPress scored68%from 54 tests.

About plugin

  • Plugin page: saragna-social-st...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2019
  • Latest release: Mar 10, 2019
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: saragna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,285 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.36ms] Passed 4 tests

An overview of server-side resources used by Saragna - Social Stream WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.44 ▼0.69
Dashboard /wp-admin3.35 ▼0.0052.12 ▼13.51
Posts /wp-admin/edit.php3.46 ▲0.1052.82 ▼4.59
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.39 ▼18.63
Media Library /wp-admin/upload.php3.27 ▲0.0443.66 ▲7.32
General Shortcode /wp-admin/admin.php?page=social-fb-you-vimeo-twit-insta3.2943.03
Social Setting /wp-admin/admin.php?page=fb-you-vimeo-twit-insta-social-setting3.2937.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 57 new files
Database: 1 new table, 6 new options
New tables
wp_wp_fb_you_vimeo
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Saragna - Social Stream WordPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20514.36 ▼0.0422.69 ▲21.1141.51 ▼2.09
Dashboard /wp-admin2,259 ▲534.85 ▼0.08103.60 ▼1.6176.37 ▲29.83
Posts /wp-admin/edit.php2,153 ▲532.06 ▲0.0539.17 ▼1.6038.52 ▲3.76
Add New Post /wp-admin/post-new.php1,588 ▲6223.28 ▲5.71774.39 ▲96.3354.21 ▲2.85
Media Library /wp-admin/upload.php1,441 ▲444.21 ▼0.04102.80 ▼2.5783.35 ▲39.21
General Shortcode /wp-admin/admin.php?page=social-fb-you-vimeo-twit-insta8421.8733.6131.94
Social Setting /wp-admin/admin.php?page=fb-you-vimeo-twit-insta-social-setting1,0942.0527.2038.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_wp_fb_you_vimeo
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/saragna-social-stream/admin/setting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/saragna-social-stream/inc/get_tweets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/saragna-social-stream/admin/main.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fb-you-vimeo-twit-insta-social-setting
    • > Javascript (severe) in unknown
    /wp-content/plugins/saragna-social-stream/assets/js/admin.js?ver=1.0 30:22 Uncaught TypeError: $(...).wpColorPicker is not a function

Optimizations

Plugin configuration 96% from 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
5 plugin tags: facebook feed, youtube feed, instagram feed, social stream, twitter feed

saragna-social-stream/saragna-social-stream.php 92% from 13 tests

Analyzing the main PHP file in "Saragna - Social Stream WordPress" version 1.0
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin7,199 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS81321023,554
PHP12106701,634
JavaScript11951501,147
SVG100565
PO File193104225
HTML13074

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1161.11%
▷ Protected methods422.22%
▷ Private methods316.67%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.68MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/l6.png101.76KB33.47KB▼ 67.11%
assets/css/yplay.png2.95KB1.71KB▼ 41.95%
assets/image/l4.png101.79KB33.74KB▼ 66.85%
assets/image/l1.png101.76KB33.24KB▼ 67.33%
assets/image/l7.png74.19KB24.77KB▼ 66.62%