78% free-facebook-reviews-and-recommendations-widgets

Code Review | Widgets for Reviews & Recommendations

WordPress plugin Widgets for Reviews & Recommendations scored78%from 54 tests.

About plugin

  • Plugin page: free-facebook-rev...
  • Plugin version: 11.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2019
  • Latest release: Nov 24, 2023
  • Number of updates: 229
  • Update frequency: every 7.7 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

7,000+ active /237,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲1.05ms] Passed 4 tests

Analyzing server-side resources used by Widgets for Reviews & Recommendations
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1245.46 ▲4.87
Dashboard /wp-admin4.46 ▲1.1151.60 ▼9.49
Posts /wp-admin/edit.php4.50 ▲1.1458.55 ▲11.07
Add New Post /wp-admin/post-new.php7.11 ▲1.2196.01 ▼2.24
Media Library /wp-admin/upload.php4.34 ▲1.1047.11 ▲15.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 264 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_facebook_reviews
New WordPress options
can_compress_scripts
trustindex-facebook-version
widget_recent-posts
theysaidso_admin_options
trustindex-facebook-active
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Widgets for Reviews & Recommendations: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲4714.06 ▼0.251.88 ▼0.1241.16 ▼4.79
Dashboard /wp-admin2,202 ▲275.54 ▼0.1797.42 ▼17.0067.46 ▲23.29
Posts /wp-admin/edit.php2,123 ▲231.97 ▼0.0439.39 ▼0.0634.51 ▲1.56
Add New Post /wp-admin/post-new.php6,426 ▲4,89929.29 ▲6.17897.41 ▲226.7738.43 ▼17.47
Media Library /wp-admin/upload.php1,413 ▲134.18 ▼0.0695.38 ▼1.4565.27 ▲25.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
  • 22× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/settings.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/get_reviews.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/advanced.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/feature_request.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/rate.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/advanced.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/rate.php
    • > /wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/free-facebook-reviews-and-recommendations-widgets.php
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_facebook' not found in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/uninstall.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/include/activate.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/include/troubleshooting.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_facebook' not found in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_facebook' not found in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/free-facebook-reviews-and-recommendations-widgets/trunk/uninstall.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

free-facebook-reviews-and-recommendations-widgets/free-facebook-reviews-and-recommendations-widgets.php Passed 13 tests

The main PHP file in "Widgets for Reviews & Recommendations" ver. 11.1 adds more information about the plugin and also serves as the entry point for this plugin
126 characters long description:
Embed Facebook reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Facebook recommendations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin10,503 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,268
JavaScript73161771,059
CSS413063
SVG42061
JSON10052

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity127.00
▷ Minimum class complexity10.00
▷ Maximum class complexity348.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods196
▷ Static methods126.12%
▷ Public methods19297.96%
▷ Protected methods00.00%
▷ Private methods42.04%
Functions34
▷ Named functions1647.06%
▷ Anonymous functions1852.94%
Constants0
▷ Global constants00.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
8 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/static/img/platforms.png10.24KB4.08KB▼ 60.12%
trunk/static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
trunk/static/img/no.png1.92KB0.28KB▼ 85.53%