68% bvd-easy-social-feeds-images

Code Review | BVD Easy Social Feeds & Images

WordPress plugin BVD Easy Social Feeds & Images scored68%from 54 tests.

About plugin

  • Plugin page: bvd-easy-social-f...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: Sep 10, 2015
  • Number of updates: 17
  • Update frequency: every 1.2 days
  • Top authors: bvads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,628 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.97MB] [CPU: ▼57.69ms] Passed 4 tests

An overview of server-side resources used by BVD Easy Social Feeds & Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.19 ▼36.68
Dashboard /wp-admin2.05 ▼1.306.39 ▼60.13
Posts /wp-admin/edit.php2.05 ▼1.316.07 ▼41.51
Add New Post /wp-admin/post-new.php2.05 ▼3.847.63 ▼92.45
Media Library /wp-admin/upload.php2.05 ▼1.185.09 ▼31.73
Twitter /wp-admin/admin.php?page=bvd-social-feeds-twitter2.057.18
Facebook /wp-admin/admin.php?page=bvd-social-feeds-facebook2.056.05
Instagram /wp-admin/admin.php?page=bvd-social-feeds-instagram2.056.39
BVD Social Feeds /wp-admin/admin.php?page=bvd-social-feeds2.055.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
bvads_social_feed_uuid
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
bvads_social_feed_secret
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BVD Easy Social Feeds & Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.25 ▼0.031.69 ▲0.1743.78 ▲5.48
Dashboard /wp-admin2,222 ▲445.56 ▼0.1587.60 ▼28.4669.15 ▲28.14
Posts /wp-admin/edit.php2,139 ▲391.97 ▼0.0337.91 ▼3.9437.66 ▲0.27
Add New Post /wp-admin/post-new.php1,559 ▲3121.64 ▼1.40687.67 ▲16.5764.61 ▲5.40
Media Library /wp-admin/upload.php1,442 ▲424.09 ▼0.13102.25 ▼6.9863.71 ▲17.23
Twitter /wp-admin/admin.php?page=bvd-social-feeds-twitter9292.0230.4434.40
Facebook /wp-admin/admin.php?page=bvd-social-feeds-facebook9492.0028.2230.55
Instagram /wp-admin/admin.php?page=bvd-social-feeds-instagram9302.0326.4030.97
BVD Social Feeds /wp-admin/admin.php?page=bvd-social-feeds9382.0126.5136.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the socialFeedsPluginUserStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • bvads_social_feed_uuid
    • bvads_social_feed_secret
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the socialFeedsPluginUserStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the socialFeedsPluginUserStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+52
    Trying to get property 'secret' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+56
    Undefined index: instagram_auth
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+1672
    Trying to get property 'no_token' of non-object
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+1673
    Trying to get property 'verify' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+1673
    Trying to get property 'is_valid' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bvd-social-feeds
    • > Notice in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php+647
    Trying to get property 'key_status' of non-object

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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bvd-easy-social-feeds-images/admin-page-instagram.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bvd-easy-social-feeds-images/admin-page-facebook.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bvd-easy-social-feeds-images/bvd-social-feeds.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bvd-easy-social-feeds-images/admin-page-twitter.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Instagram view from the front-end of the site.), #2 (Instagram setup screen), #3 (Instagram display options), #4 (Instagram shortcode instructions), #5 (Facebook setup screen), #6 (Facebook display options), #7 (Facebook shortcode instructions), #8 (Twitter setup screen), #9 (Twitter display options), #10 (Twitter shortcode instructions)
You can look at the official readme.txt

bvd-easy-social-feeds-images/bvd-social-feeds.php 92% from 13 tests

The main PHP script in "BVD Easy Social Feeds & Images" version 1.0.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bvd-easy-social-feeds-images.php" instead of "bvd-social-feeds.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,474 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4234523,078
CSS21060393
JavaScript1003

PHP code Passed 2 tests

A brief analysis 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.40
Average class complexity211.00
▷ Minimum class complexity211.00
▷ Maximum class complexity211.00
Average method complexity10.13
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 1.60MB with 0.96MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png72.20KB30.37KB▼ 57.94%
screenshot-7.png95.68KB42.31KB▼ 55.78%
screenshot-4.png116.15KB55.61KB▼ 52.12%
screenshot-1.png795.33KB187.49KB▼ 76.43%
images/BVD-Logo-vert.png67.24KB28.25KB▼ 57.98%