68% reviews-from-google

Code Review | Reviews from Google

WordPress plugin Reviews from Google scored68%from 54 tests.

About plugin

  • Plugin page: reviews-from-google
  • Plugin version: 3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2019
  • Latest release: Jun 28, 2021
  • Number of updates: 24
  • Update frequency: every 29.0 days
  • Top authors: adnanusman (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,298 total downloads

Benchmarks

Plugin footprint 65% 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: ▼0.05MB] [CPU: ▼11.28ms] Passed 4 tests

A check of server-side resources used by Reviews from Google
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▼0.5120.96 ▼16.92
Dashboard /wp-admin3.42 ▲0.0848.40 ▼12.78
Posts /wp-admin/edit.php3.53 ▲0.1845.40 ▼2.48
Add New Post /wp-admin/post-new.php6.02 ▲0.1380.66 ▼12.93
Media Library /wp-admin/upload.php3.34 ▲0.1134.68 ▼1.41
Google Reviews /wp-admin/options-general.php?page=greviews-options3.2931.77

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 8 new options
New tables
wp_stored_reviews_wp
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
stored_reviews_db_version
db_upgraded
widget_theysaidso_widget
widget_greviews_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Reviews from Google
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.51 ▼0.841.78 ▲0.1043.54 ▲0.73
Dashboard /wp-admin2,231 ▲435.03 ▲0.11115.22 ▲6.1441.17 ▼2.08
Posts /wp-admin/edit.php2,116 ▲272.31 ▲0.3236.07 ▼0.7931.87 ▼0.35
Add New Post /wp-admin/post-new.php1,533 ▲1417.81 ▼5.46681.71 ▲4.9437.71 ▼27.31
Media Library /wp-admin/upload.php1,410 ▲284.47 ▲0.17100.67 ▼0.8741.20 ▼4.40
Google Reviews /wp-admin/options-general.php?page=greviews-options1,7562.6266.8929.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_stored_reviews_wp
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • stored_reviews_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_greviews_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=greviews-options
    • > Notice in wp-content/plugins/reviews-from-google/includes/admin-page.php+119
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reviews-from-google/includes/init.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/reviews-from-google/includes/templates/fullwidth-reviews-template.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/reviews-from-google/includes/admin-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/reviews-from-google/includes/templates/greviews-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/reviews-from-google/includes/templates/reviews-template-1.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/reviews-from-google/includes/templates/two-columns-reviews-template.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: tactical engine, google reviews, reviews, google my business reviews

reviews-from-google/greviews.php 85% from 13 tests

"Reviews from Google" version 3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("reviews-from-google.php" instead of "greviews.php")

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 plugin884 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP916459702
CSS2253146
JavaScript29336

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity11.67
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/powered_by_google_on_white.png2.08KB2.14KB0.00%