78% reviews-feed

Code Review | Reviews Feed - Google Reviews & Yelp Reviews Plugin

WordPress plugin Reviews Feed - Google Reviews & Yelp Reviews Plugin scored78%from 54 tests.

About plugin

  • Plugin page: reviews-feed
  • Plugin version: 1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Oct 5, 2023
  • Number of updates: 8
  • Update frequency: every 24.5 days
  • Top authors: Craig at Smash Balloon (62.5%)nabilsmashballoon (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /38,018 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.92MB] [CPU: ▲4.03ms] Passed 4 tests

Server-side resources used by Reviews Feed - Google Reviews & Yelp Reviews Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.38 ▲1.9248.03 ▲8.66
Dashboard /wp-admin5.24 ▲1.8958.18 ▼2.27
Posts /wp-admin/edit.php5.29 ▲1.9362.42 ▲16.99
Add New Post /wp-admin/post-new.php7.85 ▲1.9690.78 ▼5.37
Media Library /wp-admin/upload.php5.16 ▲1.9349.45 ▲15.09
About us /wp-admin/admin.php?page=sbr-about6.1879.36
All Feeds /wp-admin/admin.php?page=sbr6.2076.51
Settings /wp-admin/admin.php?page=sbr-settings6.2870.12
Support /wp-admin/admin.php?page=sbr-support6.1973.40

Server storage [IO: ▲5.83MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 396 new files
Database: 5 new tables, 10 new options
New tables
wp_sbr_sources
wp_sbr_feed_caches
wp_sbr_reviews_posts
wp_sbr_feed_locator
wp_sbr_feeds
New WordPress options
sbr_notifications
db_upgraded
can_compress_scripts
sbr_settings
widget_recent-comments
sbr_newuser_notifications
sbr_db_version
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reviews Feed - Google Reviews & Yelp Reviews Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.26 ▼1.081.46 ▼0.3938.26 ▼4.74
Dashboard /wp-admin2,265 ▲775.91 ▲1.01109.62 ▼9.4942.46 ▲0.10
Posts /wp-admin/edit.php2,151 ▲622.08 ▲0.0938.74 ▲3.1736.02 ▲1.29
Add New Post /wp-admin/post-new.php6,227 ▲4,71318.90 ▲1.24907.48 ▲226.6550.73 ▼0.85
Media Library /wp-admin/upload.php1,447 ▲594.25 ▲0.0497.92 ▼9.8942.92 ▼2.58
About us /wp-admin/admin.php?page=sbr-about1,4164.86123.1343.68
All Feeds /wp-admin/admin.php?page=sbr1,2994.78115.0630.34
Settings /wp-admin/admin.php?page=sbr-settings1,4595.0370.9641.24
Support /wp-admin/admin.php?page=sbr-support1,3774.9663.4140.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • sbr_newuser_notifications
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • sbr_notifications

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

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/reviews-feed/templates/settings/index.php
  • 97× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\Reviews\\Vendor\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/reviews-feed/vendor/php-di/php-di/src/Definition/Resolver/FactoryResolver.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'SmashBalloon\\Reviews\\Vendor\\DI\\Container' not found in wp-content/plugins/reviews-feed/vendor/php-di/php-di/src/CompiledContainer.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Smashballoon\\Stubs\\Services\\ServiceProvider' not found in wp-content/plugins/reviews-feed/class/Common/Migrations/Reviews_Post.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Smashballoon\\Stubs\\Services\\ServiceProvider' not found in wp-content/plugins/reviews-feed/class/Common/Services/Upgrade/RoutineManagerService.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Smashballoon\\Customizer\\V2\\PreviewProvider' not found in wp-content/plugins/reviews-feed/class/Common/Customizer/ShortcodePreviewProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SmashBalloon\\Reviews\\Vendor\\DI\\Definition\\Resolver\\ObjectCreator' not found in wp-content/plugins/reviews-feed/vendor/php-di/php-di/src/Definition/Resolver/InstanceInjector.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\Reviews\\Vendor\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/reviews-feed/vendor/php-di/php-di/src/Compiler/RequestedEntryHolder.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\Reviews\\Vendor\\Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/reviews-feed/vendor/psr/container/src/NotFoundExceptionInterface.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Smashballoon\\Customizer\\V2\\Feed_Builder' not found in wp-content/plugins/reviews-feed/class/Common/Builder/SBR_Feed_Builder.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'SmashBalloon\\Reviews\\Vendor\\Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/reviews-feed/vendor/php-di/php-di/src/NotFoundException.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: yelp, google reviews, google business, ratings, reviews

reviews-feed/sb-reviews.php 92% from 13 tests

"Reviews Feed - Google Reviews & Yelp Reviews Plugin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("reviews-feed.php" instead of "sb-reviews.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
Good job! No executable or dangerous file extensions detected25,712 lines of code in 335 files:
LanguageFilesBlank linesComment linesLines of code
PHP1912,6865,84916,670
JavaScript82842104,014
CSS6251932,128
SVG111221,547
Markdown102880646
JSON700541
YAML140139
XML13327

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.77
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces46
Interfaces17
Traits2
Classes152
▷ Abstract classes63.95%
▷ Concrete classes14696.05%
▷ Final classes21.37%
Methods933
▷ Static methods18920.26%
▷ Public methods81887.67%
▷ Protected methods404.29%
▷ Private methods758.04%
Functions49
▷ Named functions3163.27%
▷ Anonymous functions1836.73%
Constants69
▷ Global constants3550.72%
▷ Class constants3449.28%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
38 PNG files occupy 0.46MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/smashballoon/customizer/sb-common/sb-customizer/assets/images/upsell-carousel.png11.57KB7.19KB▼ 37.89%
vendor/smashballoon/customizer/sb-common/sb-customizer/assets/images/upsell-trustpilot.png44.05KB18.97KB▼ 56.94%
vendor/smashballoon/customizer/sb-common/sb-customizer/assets/images/upswidget-moderation.png2.11KB1.34KB▼ 36.63%
vendor/smashballoon/customizer/sb-common/sb-customizer/assets/images/upsell-tripadvisor.png20.38KB10.50KB▼ 48.51%
assets/images/sprite.png3.85KB2.25KB▼ 41.52%