78% custom-google-places-reviews

Code Review | Custom Google Business Reviews

WordPress plugin Custom Google Business Reviews scored78%from 54 tests.

About plugin

  • Plugin page: custom-google-pla...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: May 15, 2018
  • Number of updates: 5
  • Update frequency: every 34.0 days
  • Top authors: mustaneerabdullah93 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /805 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.53ms] Passed 4 tests

A check of server-side resources used by Custom Google Business Reviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.32 ▼3.22
Dashboard /wp-admin3.36 ▲0.0649.73 ▼1.50
Posts /wp-admin/edit.php3.41 ▲0.0650.18 ▲3.21
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.58 ▲0.15
Media Library /wp-admin/upload.php3.29 ▲0.0637.67 ▲2.45
All Items /wp-admin/edit.php?post_type=google_palce_reviews3.2934.09
Add New /wp-admin/post-new.php?post_type=google_palce_reviews3.3243.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Custom Google Business Reviews: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3514.20 ▼0.141.79 ▼0.1772.95 ▲27.63
Dashboard /wp-admin2,225 ▲485.59 ▲0.0387.00 ▼4.0438.50 ▼2.05
Posts /wp-admin/edit.php2,127 ▲301.99 ▲0.0035.40 ▲0.0231.55 ▼4.39
Add New Post /wp-admin/post-new.php1,560 ▲3218.29 ▼4.79614.19 ▼87.8469.53 ▲17.91
Media Library /wp-admin/upload.php1,424 ▲244.18 ▲0.02101.37 ▼5.6344.74 ▲1.28
All Items /wp-admin/edit.php?post_type=google_palce_reviews1,1151.9334.1230.04
Add New /wp-admin/post-new.php?post_type=google_palce_reviews1,4882.5248.8769.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=google_palce_reviews
    • > Notice in wp-content/plugins/custom-google-places-reviews/custom-google-places-reviews.php+160
    Undefined variable: column
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=google_palce_reviews
    • > Notice in wp-content/plugins/custom-google-places-reviews/custom-google-places-reviews.php+160
    Trying to access array offset on value of type null

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
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 10
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 14
    • > PHP Notice
      Undefined variable: pid in wp-content/plugins/custom-google-places-reviews/include/display_page.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-google-places-reviews/include/content_place.php:14
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 11
    • > PHP Notice
      Trying to get property 'result' of non-object in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 4
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 10
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/custom-google-places-reviews/include/content_place.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

custom-google-places-reviews/custom-google-places-reviews.php Passed 13 tests

The principal PHP file in "Custom Google Business Reviews" v. 1.0.0 is loaded by WordPress automatically on each request
131 characters long description:
Custom Google Places Reviews Display your Google business pages reviews on your website just by adding a shortcode [google_reviews]

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 plugin659 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44235314
CSS1391267
SVG20278

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/google-logo-small.png1.54KB1.53KB▼ 0.95%