89% advanced-facebook-twitter-widget

Code Review | Advanced Social Feeds Widget & Shortcode

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

About plugin

  • Plugin page: advanced-facebook...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 5.9.2
  • First release: Dec 23, 2016
  • Latest release: Jul 25, 2021
  • Number of updates: 26
  • Update frequency: every 64.4 days
  • Top authors: shahaji9 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active / 12,203 total downloads


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 gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼293.36ms] Passed 4 tests

Analyzing server-side resources used by Advanced Social Feeds Widget & Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1852.67 ▲1.23
Dashboard /wp-admin3.56 ▲0.1532.34 ▲0.28
Posts /wp-admin/edit.php3.78 ▲0.1439.47 ▲4.36
Add New Post /wp-admin/post-new.php7.02 ▲0.0592.50 ▼1,175.85
Media Library /wp-admin/upload.php3.44 ▲0.1425.00 ▲0.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 2 new options
New WordPress options

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 /3,893 ▲13916.32 ▲0.659.41 ▲3.022.13 ▼0.96
Dashboard /wp-admin2,895 ▲376.08 ▼0.03116.96 ▼17.78154.54 ▼6.22
Posts /wp-admin/edit.php2,691 ▼03.23 ▲0.0064.34 ▲1.13140.73 ▼3.07
Add New Post /wp-admin/post-new.php1,717 ▲5620.87 ▲4.52441.87 ▲49.27159.71 ▲4.06
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.00136.12 ▼7.13188.72 ▲4.47

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 did not uninstall successfully, leaving 2 options in the database
    • widget_fbtw_facebook
    • widget_fbtw_tweets

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


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:
  • 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)
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main PHP file in "Advanced Social Feeds Widget & Shortcode" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)
  • 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")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin597 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ 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-1.png60.59KB18.33KB▼ 69.75%
screenshot-4.png118.11KB36.67KB▼ 68.96%
screenshot-3.png176.53KB52.31KB▼ 70.37%
screenshot-2.png45.33KB14.03KB▼ 69.04%