84% wpsso-add-five-stars

Code Review | WPSSO Add Five Stars for Google Rich Snippets

WordPress plugin WPSSO Add Five Stars for Google Rich Snippets scored84%from 54 tests.

About plugin

  • Plugin page: wpsso-add-five-stars
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 320
  • Update frequency: every 2.3 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,969 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by WPSSO Add Five Stars for Google Rich Snippets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.28 ▼0.06
Dashboard /wp-admin3.39 ▲0.0848.28 ▼0.54
Posts /wp-admin/edit.php3.50 ▲0.1445.46 ▼3.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.42 ▼16.53
Media Library /wp-admin/upload.php3.31 ▲0.0835.47 ▼0.15

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WPSSO Add Five Stars for Google Rich Snippets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.14 ▼0.211.80 ▲0.0843.43 ▼3.61
Dashboard /wp-admin2,201 ▲245.64 ▼0.0997.08 ▲8.8643.96 ▲5.36
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0034.00 ▼6.2237.93 ▲3.05
Add New Post /wp-admin/post-new.php1,532 ▼1323.54 ▼1.54637.65 ▼6.3051.63 ▼12.88
Media Library /wp-admin/upload.php1,409 ▲64.20 ▲0.03100.06 ▼2.0243.01 ▲0.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpsso-add-five-stars/wpsso-add-five-stars.php
    • > /wp-content/plugins/wpsso-add-five-stars/lib/filters.php
    • > /wp-content/plugins/wpsso-add-five-stars/lib/config.php
    • > /wp-content/plugins/wpsso-add-five-stars/lib/abstract/add-on.php
    • > /wp-content/plugins/wpsso-add-five-stars/lib/abstract/com/add-on.php
    • > /wp-content/plugins/wpsso-add-five-stars/lib/register.php
    • > /wp-content/plugins/wpsso-add-five-stars/gettext/gettext-lib-config.php
    • > /wp-content/plugins/wpsso-add-five-stars/gettext/gettext-lib-abstract-com.php

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 Passed 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
7 plugin tags: reviews, rich snippet, ratings, schema, google...

wpsso-add-five-stars/wpsso-add-five-stars.php Passed 13 tests

"WPSSO Add Five Stars for Google Rich Snippets" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Add a 5 star rating and review from the site organization if the Schema markup does not already have an 'aggregateRating' property.

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
Good job! No executable or dangerous file extensions detected548 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9231170421
Markdown124060
PO File1101037
HTML232030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.83
▷ Minimum class complexity4.00
▷ Maximum class complexity31.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods32
▷ Static methods825.00%
▷ Public methods2475.00%
▷ Protected methods412.50%
▷ Private methods412.50%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png48.37KB19.85KB▼ 58.97%
images/icon-128x128.png19.77KB8.22KB▼ 58.43%