83% facebook-pagelike-widget

Code Review | Widget for Social Page Feeds

WordPress plugin Widget for Social Page Feeds scored83%from 54 tests.

About plugin

  • Plugin page: facebook-pagelike...
  • Plugin version: 6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 6, 2012
  • Latest release: Apr 15, 2023
  • Number of updates: 250
  • Update frequency: every 15.4 days
  • Top authors: Milap (100%)

Code review

54 tests

User reviews

380 reviews

Install metrics

80,000+ active /1,388,414 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.87ms] Passed 4 tests

This is a short check of server-side resources used by Widget for Social Page Feeds
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.44 ▼6.39
Dashboard /wp-admin3.33 ▲0.0250.14 ▼4.60
Posts /wp-admin/edit.php3.44 ▲0.0948.36 ▼5.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.33 ▼19.39
Media Library /wp-admin/upload.php3.25 ▲0.0236.10 ▼0.33

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_fbw_id
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Widget for Social Page Feeds
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.14 ▼0.591.79 ▲0.0642.93 ▼3.20
Dashboard /wp-admin2,235 ▲615.52 ▼0.1494.15 ▼0.7989.99 ▲44.78
Posts /wp-admin/edit.php2,138 ▲382.07 ▲0.1234.37 ▼3.8634.63 ▼2.63
Add New Post /wp-admin/post-new.php1,565 ▲3922.94 ▼0.58774.36 ▲105.0271.23 ▲22.15
Media Library /wp-admin/upload.php1,440 ▲374.18 ▲0.02106.20 ▲7.5883.25 ▲34.68

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_fbw_id

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/facebook-pagelike-widget/includes/add-review.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/facebook-pagelike-widget/facebook_widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/facebook-pagelike-widget/fb_class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/facebook-pagelike-widget/short_code.php:17

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 90% 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png - Explains how you can configure plugin in admin widget area.), #2 (screenshot-2.png - Shows how your plugin will display in frontend sidebar(widget) area.), #3 (screenshot-3.png - Shows how your plugin will display in Page or Post as Shortcode.)
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

facebook-pagelike-widget/facebook_widget.php 92% from 13 tests

This is the main PHP file of "Widget for Social Page Feeds" version 6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("facebook-pagelike-widget.php" instead of "facebook_widget.php")

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
There were no executable files found in this plugin593 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP48237340
JSON10086
CSS10080
JavaScript30044
PO File1141443

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.48MB with 0.33MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png302.18KB81.84KB▼ 72.92%
screenshot-1.png37.97KB13.24KB▼ 65.14%
screenshot-2.png146.28KB45.73KB▼ 68.74%