89% advanced-facebook-twitter-widget

Code Review | Advanced Social Feeds Widget & Shortcode

WordPress plugin Advanced Social Feeds Widget & Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: advanced-facebook...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 23, 2016
  • Latest release: Jul 5, 2022
  • Number of updates: 31
  • Update frequency: every 70.6 days
  • Top authors: shahaji9 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

9,000+ active /16,145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.52ms] Passed 4 tests

An overview of server-side resources used by Advanced Social Feeds Widget & Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1640.43 ▼7.58
Dashboard /wp-admin3.45 ▲0.1051.65 ▼25.16
Posts /wp-admin/edit.php3.50 ▲0.1451.78 ▼1.81
Add New Post /wp-admin/post-new.php6.03 ▲0.1494.20 ▼3.53
Media Library /wp-admin/upload.php3.37 ▲0.1441.36 ▲4.78

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_fbtw_facebook
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_fbtw_tweets

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Social Feeds Widget & Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲12313.81 ▼0.568.54 ▲6.4241.50 ▼6.84
Dashboard /wp-admin2,195 ▲185.63 ▼0.0590.51 ▼13.6539.03 ▼3.09
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0440.07 ▲2.3034.46 ▼2.73
Add New Post /wp-admin/post-new.php1,531 ▼523.07 ▼0.06690.68 ▲12.0053.62 ▼2.19
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.09110.68 ▲4.1547.14 ▲1.61

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_fbtw_facebook
    • widget_fbtw_tweets
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (See screenshot-1.png - Shows facebook page like widget settings), #2 (See screenshot-2.png - Shows twitter follow button and timeline settings), #3 (See screenshot-3.png - Shows how facebook page like and timeline will be showing at sidebar), #4 (See screenshot-4.png - Shows how twitter follow button and timeline will be showing at sidebar)
Please take inspiration from this readme.txt

advanced-facebook-twitter-widget/index.php 85% from 13 tests

The main file in "Advanced Social Feeds Widget & Shortcode" v. 1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-facebook-twitter-widget.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 212 characters long)

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
Everything looks great! No dangerous files found in this plugin597 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38670486
JSON10086
JavaScript13625

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity23.00
▷ Minimum class complexity20.00
▷ Maximum class complexity26.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.39MB with 0.27MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png176.53KB52.31KB▼ 70.37%
screenshot-2.png45.33KB14.03KB▼ 69.04%
screenshot-1.png60.59KB18.33KB▼ 69.75%
screenshot-4.png118.11KB36.67KB▼ 68.96%