72% instagram-feed

Code Review | Smash Balloon Social Photo Feed

WordPress plugin Smash Balloon Social Photo Feed scored 72% from 54 tests.

About plugin

  • Plugin page: instagram-feed
  • Plugin version: 6.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 5.9.2
  • First release: Jul 23, 2014
  • Latest release: Feb 23, 2022
  • Number of updates: 409
  • Update frequency: every 6.8 days
  • Top authors: smashballoon (96.09%)Craig at Smash Balloon (4.16%)

Code review

54 tests

User reviews

3702 reviews

Install metrics

1,000,000+ active / 26,091,461 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.75MB] [CPU: ▼277.93ms] Passed 4 tests

Analyzing server-side resources used by Smash Balloon Social Photo Feed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.84 ▲3.3376.67 ▲13.99
Dashboard /wp-admin7.31 ▲3.9159.05 ▲20.33
Posts /wp-admin/edit.php7.54 ▲3.9064.29 ▲20.83
Add New Post /wp-admin/post-new.php10.84 ▲3.87119.71 ▼1,166.85
Media Library /wp-admin/upload.php7.26 ▲3.9753.31 ▲26.43
oEmbeds /wp-admin/admin.php?page=sbi-oembeds-manager7.2753.83
Instagram Feed /wp-admin/admin.php?page=sb-instagram-feed7.2353.58
Support /wp-admin/admin.php?page=sbi-support7.7465.28
Settings /wp-admin/admin.php?page=sbi-settings7.7765.28
All Feeds /wp-admin/admin.php?page=sbi-feed-builder8.2579.03
Facebook Feed /wp-admin/admin.php?page=cff-builder7.1241.34
YouTube Feed /wp-admin/admin.php?page=sb-instagram-feed&tab=more7.2347.36
About Us /wp-admin/admin.php?page=sbi-about-us7.2752.55

Server storage [IO: ▲3.42MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 268 new files
Database: 6 new tables, 8 new options
New tables
wp_sbi_instagram_feed_locator
wp_sbi_feeds
wp_sbi_sources
wp_sbi_feed_caches
wp_sbi_instagram_posts
wp_sbi_instagram_feeds_posts
New WordPress options
sbi_newuser_notifications
sbi_statuses
sbi_db_version
sbi_notifications
sbi_usage_tracking
sbi_usage_tracking_config
sb_instagram_settings
widget_instagram-feed-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smash Balloon Social Photo Feed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,922 ▲16816.46 ▲0.845.92 ▼0.712.62 ▼0.12
Dashboard /wp-admin3,038 ▲1807.14 ▲0.89121.63 ▼56.13207.06 ▲23.83
Posts /wp-admin/edit.php2,841 ▲1503.29 ▲0.0572.43 ▲6.80189.19 ▼11.66
Add New Post /wp-admin/post-new.php1,744 ▲7620.69 ▼0.04419.27 ▲14.85177.40 ▼3.78
Media Library /wp-admin/upload.php1,845 ▲1476.02 ▲0.47135.42 ▼26.08282.73 ▲72.93
oEmbeds /wp-admin/admin.php?page=sbi-oembeds-manager1,7994.2783.71152.90
Instagram Feed /wp-admin/admin.php?page=sb-instagram-feed1,1323.1659.1670.63
Support /wp-admin/admin.php?page=sbi-support2,2584.2294.01218.06
Settings /wp-admin/admin.php?page=sbi-settings3,5445.76119.42324.91
All Feeds /wp-admin/admin.php?page=sbi-feed-builder6,4099.35203.83361.31
Facebook Feed /wp-admin/admin.php?page=cff-builder280.940.0316.69
YouTube Feed /wp-admin/admin.php?page=sb-instagram-feed&tab=more1,1223.1462.2888.78
About Us /wp-admin/admin.php?page=sbi-about-us2,2234.0987.64147.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_instagram-feed-widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 57× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/instagram-feed/admin/builder/templates/sections/popup/onboarding-popup.php
    • > /wp-content/plugins/instagram-feed/admin/builder/templates/sections/feeds/instances.php
    • > /wp-content/plugins/instagram-feed/admin/builder/templates/sections/popup/onboarding-customizer-popup.php
    • > /wp-content/plugins/instagram-feed/inc/class-sb-instagram-oembed.php
    • > /wp-content/plugins/instagram-feed/inc/class-sb-instagram-post-set.php
    • > /wp-content/plugins/instagram-feed/admin/builder/templates/sections/popup/embed-popup.php
    • > /wp-content/plugins/instagram-feed/inc/class-sb-instagram-gdpr-integrations.php
    • > /wp-content/plugins/instagram-feed/inc/class-sb-instagram-api-connect.php
    • > /wp-content/plugins/instagram-feed/admin/builder/templates/sections/feeds-list.php
    • > /wp-content/plugins/instagram-feed/inc/class-sb-instagram-display-elements.php
  • 59× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/instagram-feed/admin/views/settings/index.php:7
    • > PHP Warning
      include_once(): Failed opening 'SBI_BUILDER_DIRtemplates/sections/create-feed/single-sources.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/instagram-feed/admin/builder/templates/sections/select-source.php on line 3
    • > PHP Warning
      Use of undefined constant SBI_BUILDER_DIR - assumed 'SBI_BUILDER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/instagram-feed/admin/builder/templates/sections/create-feed/multiple-sources.php on line 11
    • > PHP Warning
      Use of undefined constant SBI_BUILDER_DIR - assumed 'SBI_BUILDER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/instagram-feed/admin/builder/templates/sections/select-source.php on line 3
    • > PHP Warning
      include(SBI_BUILDER_DIRtemplates/sections/create-feed/multiple-sources-list.php): failed to open stream: No such file or directory in wp-content/plugins/instagram-feed/admin/builder/templates/sections/popup/feedtypes-customizer-popup.php on line 9
    • > PHP Warning
      include_once(): Failed opening 'SBI_BUILDER_DIRtemplates/sections/feeds/instances.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/instagram-feed/admin/builder/templates/sections/feeds-list.php on line 8
    • > PHP Warning
      include_once(): Failed opening 'SBI_BUILDER_DIRtemplates/sections/create-feed/multiple-sources.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/instagram-feed/admin/builder/templates/sections/select-source.php on line 5
    • > PHP Warning
      include_once(SBI_BUILDER_DIRtemplates/sections/create-feed/multiple-sources-list.php): failed to open stream: No such file or directory in wp-content/plugins/instagram-feed/admin/builder/templates/sections/create-feed/multiple-sources.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'InstagramFeed\\Builder\\SBI_Feed_Builder' not found in wp-content/plugins/instagram-feed/admin/builder/templates/builder.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'InstagramFeed\\Builder\\SB_Builder_Customizer' not found in wp-content/plugins/instagram-feed/admin/builder/templates/sections/customizer/sidebar.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=cff-builder
    • > Network (severe)
    wp-admin/admin.php?page=cff-builder - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: The official readme.txt might help

instagram-feed/instagram-feed.php Passed 13 tests

"Smash Balloon Social Photo Feed" version 6.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
72 characters long description:
Display beautifully clean, customizable, and responsive Instagram feeds.

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
Good job! No executable or dangerous file extensions detected47,500 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1394,0097,34523,300
CSS1497561118,412
JavaScript216851,0615,610
SVG900156
XML10012
JSON20010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity35.08
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces8
Interfaces0
Traits1
Classes74
▷ Abstract classes11.35%
▷ Concrete classes7398.65%
▷ Final classes00.00%
Methods759
▷ Static methods29538.87%
▷ Public methods71894.60%
▷ Protected methods141.84%
▷ Private methods273.56%
Functions88
▷ Named functions8798.86%
▷ Anonymous functions11.14%
Constants41
▷ Global constants2048.78%
▷ Class constants2151.22%
▷ Public constants21100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
58 PNG files occupy 0.55MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/insta-logo.png4.14KB2.15KB▼ 47.99%
admin/assets/img/rocket-icon.png1.09KB1.14KB0.00%
admin/assets/img/about/plugin-wpforms.png6.03KB6.28KB0.00%
admin/assets/img/save-plus-icon.png2.91KB1.10KB▼ 62.08%
admin/builder/assets/img/singlealbum.png1.17KB1.15KB▼ 1.92%