57% wp-google-places-review-slider

Code Review | WP Google Review Slider

WordPress plugin WP Google Review Slider scored57%from 54 tests.

About plugin

  • Plugin page: wp-google-places-...
  • Plugin version: 13.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Nov 12, 2023
  • Number of updates: 195
  • Update frequency: every 12.3 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

289 reviews

Install metrics

30,000+ active /928,484 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.61MB] [CPU: ▼5.44ms] Passed 4 tests

Analyzing server-side resources used by WP Google Review Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6143.12 ▲2.75
Dashboard /wp-admin3.95 ▲0.6151.26 ▼6.23
Posts /wp-admin/edit.php4.00 ▲0.6551.54 ▲5.34
Add New Post /wp-admin/post-new.php6.47 ▲0.5883.96 ▼21.35
Media Library /wp-admin/upload.php3.87 ▲0.6437.13 ▲3.08
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0639.72
Google Crawl /wp-admin/admin.php?page=wp_google-googlecrawl3.7335.68
Google API /wp-admin/admin.php?page=wp_google-googleplacesapi3.7235.95

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 266 new files
Database: 3 new tables, 12 new options
New tables
wp_wpfb_total_averages
wp_wpfb_reviews
wp_wpfb_post_templates
New WordPress options
wprev_activated_time_google
wp-google-reviews_current_db_version
can_compress_scripts
fs_debug_mode
wp-google-reviews_version
widget_recent-comments
db_upgraded
widget_recent-posts
fs_accounts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Google Review Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲21913.39 ▼0.969.79 ▲8.0432.98 ▼10.77
Dashboard /wp-admin2,272 ▲955.54 ▼0.1084.31 ▼10.7540.81 ▲0.74
Posts /wp-admin/edit.php2,137 ▲342.01 ▼0.0140.36 ▼0.0538.97 ▲2.24
Add New Post /wp-admin/post-new.php1,547 ▲2123.62 ▲0.75620.47 ▲10.7360.88 ▲2.76
Media Library /wp-admin/upload.php1,439 ▲394.22 ▼0.0697.23 ▲1.2645.73 ▲3.38
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0881.7124.2931.09
Google Crawl /wp-admin/admin.php?page=wp_google-googlecrawl1,0121.6828.4554.88
Google API /wp-admin/admin.php?page=wp_google-googleplacesapi1,1191.8328.0939.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-google-places-review-slider/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 1 table
    • wp_wpfb_total_averages
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_theysaidso_widget
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_accounts
    • can_compress_scripts
    • wp-google-reviews_current_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_google-googlecrawl
    • > Notice in wp-content/plugins/wp-google-places-review-slider/admin/partials/googlecrawl.php+72
    Trying to access array offset on value of type null
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_google-googleplacesapi
    • > Notice in wp-content/plugins/wp-google-places-review-slider/admin/class-wp-google-reviews-admin.php+680
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-google-places-review-slider/admin/partials/settings.php:16
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display.php on line 17
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display-widget.php on line 20
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display-widget.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display-widget.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/wp-google-places-review-slider/admin/partials/tabmenu.php:2
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-google-places-review-slider/public/partials/wp-google-reviews-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-google-places-review-slider/admin/partials/review_list.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-google-places-review-slider/public/class-wp-google-reviews-template_action.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #8, #9 in wp-google-places-review-slider/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === wp-google-places-review-slider === )
Please take inspiration from this readme.txt

wp-google-places-review-slider/wp-google-reviews.php 85% from 13 tests

"WP Google Review Slider" version 13.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-google-places-review-slider.php" instead of "wp-google-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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin41,217 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1438,90318,78237,865
JavaScript215779322,160
CSS214025978
Markdown1680214

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity83.25
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods1,419
▷ Static methods20214.24%
▷ Public methods1,00670.89%
▷ Protected methods332.33%
▷ Private methods38026.78%
Functions108
▷ Named functions108100.00%
▷ Anonymous functions00.00%
Constants171
▷ Global constants12472.51%
▷ Class constants4727.49%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.41MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/template1_thumb.png27.86KB9.86KB▼ 64.61%
public/partials/imgs/facebook_mystery_man.png2.93KB2.94KB0.00%
public/partials/imgs/facebook_small_icon.png0.22KB0.20KB▼ 7.17%
admin/partials/logo_old.png23.51KB7.24KB▼ 69.19%
admin/partials/google_small_icon.png1.05KB1.04KB▼ 0.65%