72% wp-social-feeds

Code Review | Wp Social Feeds

WordPress plugin Wp Social Feeds scored72%from 54 tests.

About plugin

  • Plugin page: wp-social-feeds
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Jan 17, 2020
  • Number of updates: 12
  • Update frequency: every 3.8 days
  • Top authors: najmulcse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.22ms] Passed 4 tests

An overview of server-side resources used by Wp Social Feeds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.60 ▲0.93
Dashboard /wp-admin3.33 ▲0.0249.83 ▼16.74
Posts /wp-admin/edit.php3.38 ▲0.0248.42 ▲1.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.70 ▼2.03
Media Library /wp-admin/upload.php3.25 ▲0.0236.98 ▼3.05
Manage Social Feeds /wp-admin/admin.php?page=wp-social-feeds/src/admin/class-social-feeds-admin.php3.2031.72

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

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

Browser metrics Passed 4 tests

Wp Social Feeds: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲20913.64 ▼0.729.71 ▲7.3541.39 ▼2.38
Dashboard /wp-admin2,218 ▲385.69 ▲0.0994.91 ▲0.1343.49 ▲1.56
Posts /wp-admin/edit.php2,123 ▲232.02 ▲0.0434.79 ▼1.2832.44 ▼4.81
Add New Post /wp-admin/post-new.php1,546 ▲1823.04 ▼0.24637.13 ▼73.4849.92 ▼5.66
Media Library /wp-admin/upload.php1,426 ▲264.23 ▲0.0199.59 ▼27.5644.04 ▲0.59
Manage Social Feeds /wp-admin/admin.php?page=wp-social-feeds/src/admin/class-social-feeds-admin.php8382.0424.4126.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% 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
    • > GET request to /wp-admin/admin.php?page=wp-social-feeds/src/admin/class-social-feeds-admin.php
    • > Notice in wp-content/plugins/wp-social-feeds/wp-social-feeds.php+119
    Undefined index: code
    • > GET request to /wp-admin/admin.php?page=wp-social-feeds/src/admin/class-social-feeds-admin.php
    • > Notice in wp-content/plugins/wp-social-feeds/wp-social-feeds.php+120
    Undefined index: youtube_state
    • > GET request to /wp-admin/admin.php?page=wp-social-feeds/src/admin/class-social-feeds-admin.php
    • > Notice in wp-content/plugins/wp-social-feeds/wp-social-feeds.php+134
    Undefined index: merchant

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-social-feeds/src/public/partials/social-feeds-public-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Leaddevs\\SFWPSocialFeeds\\includes\\Application\\SFWPSocialProvider_Dropdown_List_Class' not found in wp-content/plugins/wp-social-feeds/src/admin/partials/social-feeds-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Leaddevs\\SFWPSocialFeeds\\includes\\Application\\SFWPYoutube' not found in wp-content/plugins/wp-social-feeds/src/admin/partials/templates/social-feed-youtube.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-social-feeds/wp-social-feeds.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: feed, youtube, social feeds, leaddevs

wp-social-feeds/wp-social-feeds.php 85% from 13 tests

This is the main PHP file of "Wp Social Feeds" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,531 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP233789281,542
CSS2110148787
JavaScript25994182
JSON20020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.08
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods78
▷ Static methods56.41%
▷ Public methods7191.03%
▷ Protected methods00.00%
▷ Private methods78.97%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.29MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/admin/images/youtube_logo.png23.43KB12.84KB▼ 45.19%
src/assets/screenshot-4.PNG171.24KB44.44KB▼ 74.05%
src/assets/screenshot-1.PNG20.35KB9.97KB▼ 51.01%
src/admin/images/youtube.png1.94KB1.68KB▼ 13.31%
src/admin/images/grid_view.png27.11KB11.61KB▼ 57.17%