10% 5-star-google-reviews

Code Review | 5 Star Google Reviews

WordPress plugin 5 Star Google Reviews scored 10% from 54 tests.

About plugin

  • Plugin page: 5-star-google-rev...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 5.9.2
  • First release: Jul 14, 2017
  • Latest release: Jul 14, 2017
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: Raptor Websites (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,827 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/5-star-google-reviews/js5srp-5-star-reviews-plugin.php+166
    syntax error, unexpected '}', expecting end of file

Server metrics [RAM: ▼0.02MB] [CPU: ▼300.70ms] Passed 4 tests

This is a short check of server-side resources used by 5 Star Google Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0157.17 ▲6.58
Dashboard /wp-admin3.41 ▲0.0033.47 ▲0.31
Posts /wp-admin/edit.php3.64 ▲0.0037.75 ▼4.16
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.16 ▼1,192.48
Media Library /wp-admin/upload.php3.29 ▲0.0024.94 ▼6.47

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 5 Star Google Reviews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.30 ▲0.665.73 ▼0.922.45 ▼0.47
Dashboard /wp-admin2,892 ▲316.17 ▲0.01120.95 ▼10.85161.35 ▼1.53
Posts /wp-admin/edit.php2,691 ▼33.24 ▼0.0065.59 ▲0.27140.34 ▼14.15
Add New Post /wp-admin/post-new.php1,661 ▼9116.10 ▼5.50411.18 ▼58.10151.46 ▼12.71
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.03144.09 ▲3.81183.51 ▼4.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/5-star-google-reviews/js5srp-reviewform.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/5-star-google-reviews/js5srp-5-star-reviews-plugin.php on line 166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/5-star-google-reviews/js5srp-sc.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

5-star-google-reviews/js5srp-5-star-reviews-plugin.php 85% from 13 tests

The primary PHP file in "5 Star Google Reviews" version 0.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("5-star-google-reviews.php" instead of "js5srp-5-star-reviews-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,861 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
LESS16290241,215
CSS6971901,131
JavaScript93251241,014
PHP49048316
Markdown2790107
JSON20072
YAML1206

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.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
11 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-bar-rating-master/examples/img/star@2x.png1.99KB1.25KB▼ 37.24%
jquery-bar-rating-master/examples/img/antenna@2x.png5.29KB2.78KB▼ 47.40%
jquery-bar-rating-master/examples/img/github@2x.png2.67KB2.24KB▼ 16.24%
images/googlelogo.png15.42KB5.70KB▼ 63.03%
images/yelplogo.png48.23KB17.06KB▼ 64.62%