90% stars-google-rating

Code Review | Google rating

WordPress plugin Google rating scored 90% from 54 tests.

About plugin

  • Plugin page: stars-google-rating
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Dec 9, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: freelancevip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 816 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.60ms] Passed 4 tests

An overview of server-side resources used by Google rating
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.13 ▼6.65
Dashboard /wp-admin3.35 ▲0.0546.20 ▼0.94
Posts /wp-admin/edit.php3.46 ▲0.1146.26 ▼2.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.23 ▼19.03
Media Library /wp-admin/upload.php3.27 ▲0.0431.91 ▼2.15
Google Rating /wp-admin/options-general.php?page=google_rating3.2431.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 9 new options
New tables
wp_google_ratings
New WordPress options
widget_recent-comments
google_rating_ip_check
widget_theysaidso_widget
widget_recent-posts
db_upgraded
google_rating_show_in_posts
theysaidso_admin_options
google_rating_votes_label
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Google rating
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.61 ▼0.7610.80 ▲8.6942.19 ▼2.12
Dashboard /wp-admin2,210 ▲224.86 ▼0.98107.97 ▲1.5342.04 ▼1.70
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0040.15 ▼0.2036.57 ▲5.30
Add New Post /wp-admin/post-new.php1,545 ▲1218.28 ▼4.99625.38 ▲6.9860.56 ▲8.99
Media Library /wp-admin/upload.php1,395 ▲74.15 ▼0.0594.39 ▼1.4142.78 ▼1.93
Google Rating /wp-admin/options-general.php?page=google_rating8292.0424.6028.11

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: rich snippet, rate posts, rate, star rating, stars...

stars-google-rating/stars-google-rating.php Passed 13 tests

The main PHP file in "Google rating" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
88 characters long description:
Simple and fast rating system with google rich snippet http://schema.org/AggregateRating

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected331 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP773122267
CSS17233
JavaScript20031

PHP code Passed 2 tests

Analyzing 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.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
There are no PNG files in this plugin