90% wp-google-places-reviews

Code Review | WP Google Places Reviews

WordPress plugin WP Google Places Reviews scored90%from 54 tests.

About plugin

  • Plugin page: wp-google-places-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.0
  • WordPress version: 6.3.1
  • First release: Dec 27, 2018
  • Latest release: Dec 10, 2019
  • Number of updates: 21
  • Update frequency: every 16.6 days
  • Top authors: hawpmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,391 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.27ms] Passed 4 tests

An overview of server-side resources used by WP Google Places Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.89 ▼4.07
Dashboard /wp-admin3.38 ▲0.0745.98 ▼3.99
Posts /wp-admin/edit.php3.49 ▲0.1452.01 ▲1.06
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.78 ▼14.06
Media Library /wp-admin/upload.php3.30 ▲0.0742.15 ▲6.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Google Places Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲6313.19 ▼1.131.62 ▼0.4741.47 ▼5.62
Dashboard /wp-admin2,226 ▲384.85 ▼1.03110.36 ▲10.3542.36 ▼3.65
Posts /wp-admin/edit.php2,109 ▲202.04 ▲0.0435.39 ▼4.4630.23 ▼1.59
Add New Post /wp-admin/post-new.php6,436 ▲4,92228.56 ▲11.09900.53 ▲285.2839.08 ▼3.27
Media Library /wp-admin/upload.php1,411 ▲204.26 ▲0.07106.93 ▲1.6245.80 ▲2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: google reviews, review form, blocks, reviews, filter reviews

wp-google-places-reviews/hmgpr.php 92% from 13 tests

The main file in "WP Google Places Reviews" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-google-places-reviews.php" instead of "hmgpr.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin759 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP45023348
JavaScript42535261
CSS32151141
SVG1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.33
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/googlelogo.png15.42KB5.70KB▼ 63.03%