79% feed-social-sidebar

Code Review | Feed Social Sidebar

WordPress plugin Feed Social Sidebar scored79%from 54 tests.

About plugin

  • Plugin page: feed-social-sidebar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.4
  • WordPress version: 6.3.1
  • First release: Jul 2, 2020
  • Latest release: Jul 2, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: coquardcyr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.53MB] [CPU: ▲0.91ms] Passed 4 tests

Analyzing server-side resources used by Feed Social Sidebar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.02 ▲1.5549.62 ▲8.04
Dashboard /wp-admin4.83 ▲1.5357.26 ▲1.39
Posts /wp-admin/edit.php4.88 ▲1.5258.42 ▲6.46
Add New Post /wp-admin/post-new.php7.42 ▲1.5391.14 ▼12.26
Media Library /wp-admin/upload.php4.75 ▲1.5251.46 ▲17.17

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,060 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_feed_social_sidebar_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Feed Social Sidebar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲14514.03 ▼0.3411.27 ▲9.0242.38 ▼6.18
Dashboard /wp-admin2,224 ▲214.86 ▼1.01105.79 ▼16.0242.40 ▼7.27
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0436.19 ▼1.2236.92 ▲1.16
Add New Post /wp-admin/post-new.php1,545 ▲1923.19 ▲5.50647.26 ▼19.3353.64 ▲4.59
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.0595.62 ▼10.6141.75 ▼4.73

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_feed_social_sidebar_widget

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/feed-social-sidebar/vendor/timber/timber/tests/assets/my-sidebar.php
  • 410× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/feed-social-sidebar/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Timber_UnitTestCase' not found in wp-content/plugins/feed-social-sidebar/vendor/timber/timber/tests/test-timber-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/feed-social-sidebar/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\TokenParser\\TokenParserInterface' not found in wp-content/plugins/feed-social-sidebar/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/feed-social-sidebar/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/feed-social-sidebar/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/feed-social-sidebar/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Timber\\Post' not found in wp-content/plugins/feed-social-sidebar/vendor/timber/timber/tests/php/timber-post-subclass-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/feed-social-sidebar/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php:17
    • > PHP Fatal error
      require_once(): Failed opening required '/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/feed-social-sidebar/vendor/timber/timber/tests/bootstrap.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: instagram, pinterest, twitter, sidebar, feed

feed-social-sidebar/feed-social-sidebar.php Passed 13 tests

This is the main PHP file of "Feed Social Sidebar" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
21 characters long description:
Social sidebar widget

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 detected64,440 lines of code in 994 files:
LanguageFilesBlank linesComment linesLines of code
PHP7308,92215,97642,460
SVG50129,439
Markdown572,39106,576
reStructuredText1142,4912,4742,959
JSON17001,664
Bourne Shell45720307
YAML7311211
XML81952181
PO File16886180
JavaScript52344160
Twig41110148
CSS32417136
Dockerfile18010
make1409

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.45
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces53
Interfaces35
Traits4
Classes679
▷ Abstract classes152.21%
▷ Concrete classes66497.79%
▷ Final classes639.49%
Methods3,180
▷ Static methods36911.60%
▷ Public methods2,77487.23%
▷ Protected methods1946.10%
▷ Private methods2126.67%
Functions397
▷ Named functions17844.84%
▷ Anonymous functions21955.16%
Constants170
▷ Global constants5029.41%
▷ Class constants12070.59%
▷ Public constants120100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/timber/timber/tests/assets/eastern-trans.png12.34KB7.39KB▼ 40.11%
vendor/timber/timber/tests/assets/flag.png10.33KB4.00KB▼ 61.24%
vendor/timber/timber/tests/assets/cropper.png15.74KB0.31KB▼ 98.01%