53% wp-facebook-reviews

Code Review | WP Review Slider

WordPress plugin WP Review Slider scored53%from 54 tests.

About plugin

  • Plugin page: wp-facebook-reviews
  • Plugin version: 12.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Nov 10, 2023
  • Number of updates: 207
  • Update frequency: every 11.9 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

162 reviews

Install metrics

10,000+ active /411,397 total downloads

Benchmarks

Plugin footprint 30% 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: ▲5.48MB] [CPU: ▲24.98ms] 75% from 4 tests

Server-side resources used by WP Review Slider
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.48MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.22 ▲5.7676.18 ▲36.93
Dashboard /wp-admin9.24 ▲5.8977.65 ▲12.90
Posts /wp-admin/edit.php9.24 ▲5.8883.92 ▲38.91
Add New Post /wp-admin/post-new.php10.27 ▲4.38114.67 ▲16.69
Media Library /wp-admin/upload.php9.24 ▲6.0167.45 ▲33.38
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2463.95

Server storage [IO: ▲5.00MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 270 new files
Database: 3 new tables, 12 new options
New tables
wp_wpfb_post_templates
wp_wpfb_reviews
wp_wpfb_gettwitter_forms
New WordPress options
wprev_activated_time
can_compress_scripts
wprev_img_locations
theysaidso_admin_options
db_upgraded
fs_active_plugins
widget_theysaidso_widget
fs_debug_mode
fs_accounts
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Review Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲23413.47 ▼0.689.39 ▲7.6633.12 ▼10.66
Dashboard /wp-admin2,270 ▲925.60 ▲0.0497.04 ▼19.6744.79 ▼0.91
Posts /wp-admin/edit.php2,137 ▲342.00 ▲0.0641.01 ▲1.8237.96 ▲3.54
Add New Post /wp-admin/post-new.php1,547 ▲2123.16 ▲0.16706.49 ▲29.0052.79 ▼9.37
Media Library /wp-admin/upload.php1,436 ▲334.22 ▲0.0595.39 ▼5.8144.71 ▼3.38
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0911.7126.2527.83

Uninstaller [IO: ▲5.00MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Compile error in wp-content/plugins/wp-facebook-reviews/uninstall.php+120
    Cannot redeclare wpprorev_rmrf_fb() (previously declared in wp-content/plugins/wp-facebook-reviews/wp-fb-reviews.php:217)
  • The plugin did not uninstall successfully, leaving 270 files (5.00MB) in the plugin directory
    • (new file) admin/index.php
    • (new file) admin/css/wprev_admin.css
    • (new file) admin/class-wp-fb-reviews-admin.php
    • (new file) admin/css/wprevpro_admin.css
    • (new file) admin/js/review_list_page.js
    • (new file) admin/js/wprev_admin.js
    • (new file) admin/css/wprev_w3.css
    • (new file) README.txt
    • (new file) LICENSE.txt
    • (new file) admin/js/templates_posts_page.js
    • ...
  • Zombie tables detected upon uninstall: 3 tables
    • wp_wpfb_gettwitter_forms
    • wp_wpfb_reviews
    • wp_wpfb_post_templates
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_recent-posts
    • can_compress_scripts
    • wprev_activated_time
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • wprev_img_locations
    • fs_active_plugins
    • fs_debug_mode
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-facebook-reviews/public/class-wp-fb-reviews-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/wp-facebook-reviews/admin/twitteroauth/src/TwitterOAuth.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/wp-facebook-reviews/admin/twitteroauth/src/HmacSha1.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-facebook-reviews/public/partials/wp-fb-reviews-public-display-widget.php on line 20
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-facebook-reviews/public/partials/wp-fb-reviews-public-display-widget.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-facebook-reviews/admin/partials/settings.php:16
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-facebook-reviews/public/partials/wp-fb-reviews-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-facebook-reviews/admin/partials/facebook.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/wp-facebook-reviews/admin/partials/get_twitter.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-facebook-reviews/public/class-wp-fb-reviews-template_action.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-facebook-reviews === )
You can take inspiration from this readme.txt

wp-facebook-reviews/wp-fb-reviews.php 85% from 13 tests

The primary PHP file in "WP Review Slider" version 12.8 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-facebook-reviews.php" instead of "wp-fb-reviews.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin41,919 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1539,12419,66838,245
JavaScript154207501,858
CSS2283631,602
Markdown1680214

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity71.39
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes70
▷ Abstract classes34.29%
▷ Concrete classes6795.71%
▷ Final classes00.00%
Methods1,487
▷ Static methods21014.12%
▷ Public methods1,05871.15%
▷ Protected methods332.22%
▷ Private methods39626.63%
Functions111
▷ Named functions11099.10%
▷ Anonymous functions10.90%
Constants171
▷ Global constants12170.76%
▷ Class constants5029.24%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
28 PNG files occupy 0.42MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/partials/imgs/stars_0_yellow.png6.46KB1.90KB▼ 70.51%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/partials/imgs/google_mystery_man.png0.61KB0.62KB0.00%
admin/partials/facebook_small_icon.png0.22KB0.20KB▼ 7.17%
public/partials/imgs/negative.png3.02KB0.28KB▼ 90.89%