78% fb-reviews-widget

Code Review | Social Reviews & Recommendations

WordPress plugin Social Reviews & Recommendations scored78%from 54 tests.

About plugin

  • Plugin page: fb-reviews-widget
  • Plugin version: 1.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: May 24, 2023
  • Number of updates: 105
  • Update frequency: every 22.6 days
  • Top authors: widgetpack (88.57%)richplugins (12.38%)

Code review

54 tests

User reviews

312 reviews

Install metrics

10,000+ active /428,696 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Social Reviews & Recommendations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.74 ▲7.23
Dashboard /wp-admin3.33 ▲0.0350.63 ▲2.32
Posts /wp-admin/edit.php3.38 ▲0.0348.29 ▼2.33
Add New Post /wp-admin/post-new.php5.91 ▲0.03101.82 ▼3.45
Media Library /wp-admin/upload.php3.26 ▲0.0338.69 ▲1.70
Facebook Reviews /wp-admin/options-general.php?page=fbrev3.33128.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 12 new options
New WordPress options
fbrev_active
db_upgraded
widget_recent-posts
fbrev_is_multisite
rplg_rev_notice_show
widget_recent-comments
theysaidso_admin_options
fbrev_version
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Reviews & Recommendations
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.26 ▼0.945.04 ▲2.9340.61 ▼10.09
Dashboard /wp-admin2,211 ▲234.96 ▼0.88113.35 ▲5.3737.86 ▼4.71
Posts /wp-admin/edit.php2,097 ▲52.07 ▲0.0539.05 ▼3.9433.94 ▼3.69
Add New Post /wp-admin/post-new.php1,521 ▲223.20 ▲0.16636.19 ▼35.4250.13 ▼4.27
Media Library /wp-admin/upload.php1,396 ▲84.27 ▲0.1097.43 ▼4.1144.89 ▲0.55
Facebook Reviews /wp-admin/options-general.php?page=fbrev2,12614.29509.0276.87

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 12 options in the database
    • rplg_rev_notice_show
    • widget_recent-posts
    • fbrev_is_multisite
    • theysaidso_admin_options
    • fbrev_version
    • widget_fbrev_widget
    • widget_recent-comments
    • fbrev_active
    • db_upgraded
    • widget_theysaidso_widget
    • ...

Smoke tests 50% 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)
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fb-reviews-widget/fbrev.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_script() in wp-content/plugins/fb-reviews-widget/fbrev-reviews.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fb-reviews-widget/fbrev-widget.php:10
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/usr/share/php') in wp-content/plugins/fb-reviews-widget/fbrev.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/fb-reviews-widget/fbrev-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fbrev_i() in wp-content/plugins/fb-reviews-widget/fbrev-options.php:1
    • > PHP Warning
      require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in wp-content/plugins/fb-reviews-widget/fbrev.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=fbrev
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === fb-reviews-widget === )
Please take inspiration from this readme.txt

fb-reviews-widget/fbrev.php 92% from 13 tests

The main PHP file in "Social Reviews & Recommendations" ver. 1.7.9 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fb-reviews-widget.php" instead of "fbrev.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
No dangerous file extensions were detected2,770 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP92161751,480
CSS3895537
PO File211190490
JavaScript4378260
SVG1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity53.00
▷ Minimum class complexity22.00
▷ Maximum class complexity84.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/img/avatar.png6.81KB4.08KB▼ 40.10%