73% get-google-reviews

Code Review | Get Google Reviews

WordPress plugin Get Google Reviews scored73%from 54 tests.

About plugin

  • Plugin page: get-google-reviews
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Aug 30, 2022
  • Number of updates: 7
  • Update frequency: every 2.0 days
  • Top authors: deltaitbv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,048 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼4.82ms] Passed 4 tests

An overview of server-side resources used by Get Google Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2445.35 ▲3.73
Dashboard /wp-admin3.56 ▲0.2251.65 ▼13.01
Posts /wp-admin/edit.php3.67 ▲0.3248.59 ▲0.44
Add New Post /wp-admin/post-new.php6.16 ▲0.2792.06 ▼10.42
Media Library /wp-admin/upload.php3.48 ▲0.2652.49 ▲14.61
Layout /wp-admin/admin.php?page=diggr-layout3.4536.84
Settings /wp-admin/admin.php?page=diggr-settings3.4539.65
Dashboard /wp-admin/admin.php?page=diggr-dashboard3.5135.49

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: 1 new table, 6 new options
New tables
wp_diggr_reviews
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get Google Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲20214.03 ▼0.728.91 ▲7.1446.09 ▲0.46
Dashboard /wp-admin2,271 ▲654.91 ▼0.99108.55 ▼1.4287.61 ▲39.88
Posts /wp-admin/edit.php2,168 ▲892.03 ▼0.0335.76 ▼0.8436.74 ▲0.72
Add New Post /wp-admin/post-new.php1,739 ▲19922.36 ▼1.03703.20 ▼9.9729.74 ▼27.19
Media Library /wp-admin/upload.php1,462 ▲624.20 ▲0.05114.19 ▼1.8191.15 ▲39.35
Layout /wp-admin/admin.php?page=diggr-layout8812.2427.9228.09
Settings /wp-admin/admin.php?page=diggr-settings1,3141.7626.4931.29
Dashboard /wp-admin/admin.php?page=diggr-dashboard9452.0229.5534.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_diggr_reviews
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/get-google-reviews/admin/partials/layout.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/get-google-reviews/admin/partials/dashboard.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/get-google-reviews/public/partials/diggr-reviews-no-layout.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/get-google-reviews/admin/partials/settings.php:34

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

get-google-reviews/deltait-get-google-reviews.php 85% from 13 tests

The principal PHP file in "Get Google Reviews" v. 1.2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("get-google-reviews.php" instead of "deltait-get-google-reviews.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
No dangerous file extensions were detected2,483 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP186338181,513
CSS212943516
PO File1105122305
SVG100096
JavaScript3175753

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.12
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods35.36%
▷ Public methods5089.29%
▷ Protected methods00.00%
▷ Private methods610.71%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants3
▷ Global constants3100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/diggr_search_company_google_maps.png4.51KB2.02KB▼ 55.27%