Giter Club home page Giter Club logo

pryley / site-reviews Goto Github PK

View Code? Open in Web Editor NEW
53.0 6.0 21.0 98.31 MB

Site Reviews is a WordPress plugin which allows you to easily collect and display reviews on your website or blog using easy-to-use blocks, shortcodes, and widgets.

Home Page: https://wordpress.org/plugins/site-reviews/

License: GNU General Public License v3.0

JavaScript 5.02% CSS 4.11% PHP 90.53% Shell 0.30% Makefile 0.05%
wordpress-plugin reviews ratings site-reviews wordpress display-reviews shortcodes widgets

site-reviews's Introduction

Site Reviews

Scrutinizer Code Quality Build Status Code Coverage License

Site Reviews banner

Site Reviews is a WordPress plugin which allows you to receive and display reviews on your website or blog using easy-to-use blocks, shortcodes, and widgets.

Minimum plugin requirements:

  • PHP 7.4
  • WordPress 5.9

site-reviews's People

Contributors

andersk avatar pryley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

site-reviews's Issues

'Slow query' reported by Query Monitor

Love the plugin, it was really nice to find a non-bloated, well-architected and extensible plugin handling this use case, and I appreciate your work on it.

With the v5 rollout (I didn't see this using v4) I'm now seeing Query Monitor flag a query as being slow, this is the query generated by tableConstraintExists():

SELECT CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
WHERE CONSTRAINT_SCHEMA = 'wordpress'

In case it matters, this is locally, on a multisite, within Docker. I haven't yet upgraded any production site. Just passing this on to you in case you want to check out that query and see if any optimizations can be made ...

site_reviews shortcode display, pagination issues with Elementor

http://brewtheme1elementor.flywheelsites.com/reviews/

This site has 4 reviews total. The pagination is showing at the bottom of the page even though all reviews are already displayed on the page. Clicking to page 2 shows no reviews as you might expect, but there should be no pagination to begin with.

This is the shortcode on the page, which is inside an Elementor shortcode widget.

[site_reviews display="10" pagination="true" hide="date"]


http://brewtheme1elementor.flywheelsites.com/

I also have an issue where the home page is not showing all four reviews even though the shortcode is set to display 4. In addition, while not happening at the moment, I've also had an issue where the pagination shows up on the home page even when pagination shortcode attribute is set to false.

[site_reviews display="4" hide="date"]

I'm certain this is not a cache issue as there are no caching plugins being used, and the server cache was flushed via the web hosting interface. Using Site reviews v5.13.2

Duplicate Queries wp_glsr_ratings

Duplicate Queries found with Query Monitor when using Site reviews with shortcodes with assigned posts

Query Count Callers Components Potential Troublemakers
SELECT r.rating, r.type, COUNT(r.rating) AS count
FROM wp_glsr_ratings AS r
INNER JOIN wp_glsr_assigned_posts AS apt
ON r.ID = apt.rating_id
WHERE 1=1
AND r.rating > 0
AND r.is_approved = 1
AND r.type = 'local'
AND ((apt.post_id IN ('829')
AND apt.is_published = 1))
GROUP BY r.type, r.rating
2GeminiLabs\SiteReviews\Database->dbGetResults()
2 calls
Plugin: site-reviews
2 calls
GeminiLabs\SiteReviews\Database->dbGetResults()
2 calls

Error activating plugin

I've just updated the plugin to 5.1.6, and when I try to activate the plugin I get an error:

Fatal error: Uncaught Error: Call to undefined function GeminiLabs\SiteReviews\Helpers\mb_strtolower() in /var/www/rachel/wp-content/plugins/site-reviews/plugin/Helpers/Str.php:252 Stack trace: #0 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Helpers/Str.php(110): GeminiLabs\SiteReviews\Helpers\Str::snakeCase() #1 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Database/Sql.php(282): GeminiLabs\SiteReviews\Helpers\Str::dashCase() #2 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Database/Sql.php(60): GeminiLabs\SiteReviews\Database\Query->sqlHandle() #3 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Database/SqlSchema.php(151): GeminiLabs\SiteReviews\Database\Query->sql() #4 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Database/SqlSchema.php(226): GeminiLabs\SiteReviews\Database\SqlSchema->createAssignedPostsTable() #5 /var/www/rachel/wp-content/plugins/site-reviews/plugin/Database.php(51): GeminiLabs\SiteReviews\Database\SqlSchema->createTables() #6 /var/www/rachel/wp-content/plu in /var/www/rachel/wp-content/plugins/site-reviews/plugin/Helpers/Str.php on line 252

Is there something that I can do to help further?

Spam submission protection

Add similar spam protection as https://wordpress.org/plugins/forget-spam-comment/ built into site reviews.

Blacklists is too static and you either have to manually create yours adding words all the time that fits the need or use a one size fits all list which could block words which you don't want to block. But they are in these lists as they tend to be in spam. Cleaning such big lists would also be a lot of manual work https://github.com/splorp/wordpress-comment-blacklist

reCAPTCHA is one solution but not a favour of these external scripts, and maybe not all prefer reCAPTCHA. Above light JavaScript solution, would be a very simple but protective solution and lightweight. It would also be plug and play no external API keys needs to setup etc for users. Just enable the function in the plugin settings page. The explanation of the function of the plugin is within the plugin and the video on the plugin description page.

Viewing Review Filter addon - 404

Hi

I click the link to view more about the Review Filter addon:

Addon1

But when I click it it comes up with a 404:

Addon2

I tried twice.

Thoughts?

Add a new field.

Hi,

I need to add a new field (checkbox) into the form, how can I do it?

Thanks in advance.

Feature request

  • Add support for reviews schema markup so it can be used to review products or brands.
  • Add default support for more schema markup, creative work, and many more predefined markups.
  • Add support to assign different schema markups per cpt and/or page_id or per shortcode "schema-review=true"
  • Add support to only add a review from webmaster.
  • Add support to change the text of the submit button.
  • Add user ip or cookie restriction to allow x amount of votes/reviews per days/hours etc.

Some feedback that would give the user more flexibility and more use cases for the plugin.

Possible to have various categories to be rated 1 to 5?

Hello, i'm looking for a plugin where users can review posts with 5 game categories Like:
Graphics, Gameplay, Music, Replayability etc.
Does this plugin allow more than one 5 stars rating or just the single general one?

Thanks!

Function GeminiLabs\SiteReviews\Application->__get takes 0.555044

Timing might variate from site to site depending on complexity and plugins but this function still is something that hopefully can be improved.

Function:
GeminiLabs\SiteReviews\Application->__get

Caller:

/wp-content/plugins/site-reviews/plugin/Plugin.php@47
/wp-content/plugins/site-reviews/plugin/Database/SqlSchema.php@396
/wp-content/plugins/site-reviews/plugin/Database/SqlSchema.php@362
/wp-content/plugins/site-reviews/plugin/Plugin.php@174
/wp-content/plugins/site-reviews/plugin/Plugin.php@83
/wp-content/plugins/site-reviews/plugin/Hooks/AbstractHooks.php@17
/wp-content/plugins/site-reviews/plugin/Hooks/AbstractHooks.php@18
/wp-content/plugins/site-reviews/plugin/Hooks/AbstractHooks.php@19
/wp-content/plugins/site-reviews/plugin/Hooks/AbstractHooks.php@20
/wp-content/plugins/site-reviews/plugin/Hooks/AbstractHooks.php@21
/wp-content/plugins/site-reviews/plugin/Controllers/WelcomeController.php@14
/wp-content/plugins/site-reviews/plugin/Controllers/AdminController.php@67
/wp-content/plugins/site-reviews/plugin/Controllers/MainController.php@94
/wp-content/plugins/site-reviews/plugin/Controllers/MainController.php@95
/wp-content/plugins/site-reviews/plugin/Controllers/ReviewController.php@54
/wp-content/plugins/site-reviews/plugin/Controllers/EditorController.php@61
/wp-content/plugins/site-reviews/plugin/Database/OptionManager.php@39
/wp-content/plugins/site-reviews/plugin/Database/SqlSchema.php@413
/wp-content/plugins/site-reviews/plugin/Widgets/Widget.php@32
/wp-content/plugins/site-reviews/plugin/Controllers/TranslationController.php@93
/wp-content/plugins/site-reviews/plugin/Modules/Translator.php@14
/wp-content/plugins/site-reviews/plugin/Controllers/TranslationController.php@60
/wp-content/plugins/site-reviews/plugin/Plugin.php@256
/wp-content/plugins/site-reviews/plugin/Controllers/TranslationController.php@77
/wp-content/plugins/site-reviews/helpers.php@86
/wp-content/plugins/site-reviews/helpers.php@88
/wp-content/plugins/site-reviews/plugin/Defaults/PostTypeLabelDefaults.php@22
/wp-content/plugins/site-reviews/plugin/Defaults/PostTypeDefaults.php@17
/wp-content/plugins/site-reviews/plugin/Defaults/PostTypeDefaults.php@18
/wp-content/plugins/site-reviews/plugin/Defaults/PostTypeDefaults.php@19
/wp-content/plugins/site-reviews/plugin/Defaults/PostTypeDefaults.php@21
/wp-content/plugins/site-reviews/plugin/Commands/RegisterPostType.php@30
/wp-content/plugins/site-reviews/plugin/Commands/RegisterPostType.php@31
/wp-content/plugins/site-reviews/plugin/Commands/RegisterPostType.php@43
/wp-content/plugins/site-reviews/plugin/Commands/RegisterPostType.php@55
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@68
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@71
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@73
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@81
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@82
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@84
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@86
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@98
/wp-content/plugins/site-reviews/plugin/Controllers/BlocksController.php@112
/wp-content/plugins/site-reviews/plugin/Blocks/Block.php@59
/wp-content/plugins/site-reviews/plugin/Blocks/Block.php@61
/wp-content/plugins/site-reviews/plugin/Blocks/Block.php@62
/wp-content/plugins/site-reviews/plugin/Blocks/Block.php@64
/wp-content/plugins/site-reviews/plugin/Commands/RegisterTaxonomy.php@22
/wp-content/plugins/site-reviews/plugin/Commands/RegisterTaxonomy.php@23
/wp-content/plugins/site-reviews/plugin/Router.php@98
/wp-content/plugins/site-reviews/plugin/Router.php@99
/wp-content/plugins/site-reviews/deprecated.php@36
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@28
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@29
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@33
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@36
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@168
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@37
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@95
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@98
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@115
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@38
/wp-content/plugins/site-reviews/plugin/Commands/EnqueuePublicAssets.php@65
/wp-content/plugins/site-reviews/plugin/Controllers/PublicController.php@52
/wp-content/plugins/site-reviews/plugin/Controllers/ListTableController.php@128
/wp-content/plugins/site-reviews/plugin/Modules/Sanitizer.php@130
/wp-content/plugins/site-reviews/plugin/Database.php@385
/wp-content/plugins/site-reviews/plugin/Plugin.php@184
/wp-content/plugins/site-reviews/plugin/Controllers/TranslationController.php@114
/wp-content/plugins/site-reviews/plugin/Database/NormalizePaginationArgs.php@30
/wp-content/plugins/site-reviews/plugin/Database/NormalizePaginationArgs.php@43
/wp-content/plugins/site-reviews/plugin/Database/NormalizePaginationArgs.php@59
/wp-content/plugins/site-reviews/plugin/Database/Query.php@320
/wp-content/plugins/site-reviews/plugin/Modules/Html/Field.php@174
/wp-content/plugins/site-reviews/plugin/Modules/Console.php@322
/wp-content/plugins/site-reviews/plugin/Modules/Console.php@323

Script:

    public function __get($property)
    {
        $instance = new \ReflectionClass($this);
        if ($instance->hasProperty($property)) {
            $prop = $instance->getProperty($property);
            if ($prop->isPublic() || $prop->isProtected()) {
                return $this->$property;
            }
        }
        $constant = strtoupper($property);
        if ($instance->hasConstant($constant)) {
            return $instance->getConstant($constant);
        }
    }
    ```

Performance issue

Hello there!

I have an performance issue with THIS plugin.

There is some Woocommerce site that i'm helping with migration between servers.

Without SR plugin queries on DB measured from QM are like 40.
With SR activated queries become 400.

And TTFB become from second to almost two seconds.

Is there an way to optimize plugin performance with something like Redis?

Clarification about using Filter and Form addons

Hi !

My conversion about these started in the Wordpress support forum but I prefer to chat about it here if you don't mind.

  1. I know about Site Reviews Premium, but it includes Review Images which I really do not need for this website of mine. I do think that Filter / Form can be used. So is there any possibility of a discount if I purchase these two addons?
  2. The Review Filters documentation page shows two examples of using shortcodes. But what about when we are using Gutenberg blocks? How does it work in this environment?
  3. The same question for Review Forms. How do we use it with Gutenberg block?
  4. Can the Checklist support multiple items? This is not critical, but a user might want to write about both Meeting Schedule Assistant and Public Talks. Since I have several software applications it would be nice if they could easily indicate which software the review covers.

Thank you.

No styling and some settings does not work

Hello, I have site reviews plugin installed on my Wordpress website running Wordpress 5.5.1 and OceanWp theme.
when I add the site reviews "submit review" short code, it appears like this:

firefox_CnHmmEqhyZ

The stars are not visible, submit button is not visible. I have tried all the plugin styles available in the settings (while clearing cache every time) but it does not work. Can you please help me?

Edit: I also disabled the Terms in the settings but it still appears in the form

Template tag review_link deprecated?

In the template for the email notification that gets sent when a new review is submitted and awaiting approval, there used to be a review_link template tag to insert the review's post edit link. It appears that template tag no longer works, and I see there is now an edit_url template tag.

Is the review_link template tag removed from the plugin, or is this a bug?

I can use the edit_url template tag for all sites moving forward, but we have several dozen or possibly 100+ websites that are using the older review_link template tag, so if that tag is no longer available, is there any chance of having the review_link tag automatically swapped out for the edit_url tag and accompanying HTML for the link? I understand if that is not feasible.

Thanks for your time and a great plugin!

assigned_terms and assigned_posts not working properly in site_reviews_summary

Hello,

I want to display rate summary of a certain category of a certain post. I have the following code

<?php echo do_shortcode('[site_reviews_summary assigned_posts="post_id" assigned_terms="overall" text="({num})" hide="bars,title,author" class="service-rating-display"]')?>

But this code doesn't work properly. It will display the average rating of all category (i have 4 categories in total) in that certain post + the "overall" ratings of other post.

image
image

But the display in a post that don't have rating yet, it will show an average rating of all overall rating of other posts

image

I've already tried the built in tools and I even had clean reinstall of the plugin, but the issue still persist.

Seems to work properly if no assigned_terms set

My setup:

  • Latest version of the plugin
  • Local by Flywheel
  • Windows 10

Thank you

Pagination: load more feature

Hi,

This isn't an issue but I was curios how to set the 'load more' pagination option using a shortcode. I was unable to find any documentation about it.

Many thanks in advance! :-)

All the best,

Use email address from the user profile

As an improvement, I think it would be nice to use the email address from the user profile when they leave a review.

The review form has the email address field, but when a user is already logged in that information is already known and I think asking the user to re-enter it doesn't help with user experience. I can see two ways (possibly configurable):

  1. Leave the field but pre-complete it with the email address
  2. Remove the field and use the email address from the user profile

The same could be true for first name and surname.

Feature request: Lazy load

@pryley
What do you think about this?

How about lazy loading the whole widget. If they are used below the fold especially at the end of the page it could really benefit to lazy load everything.

Options for users:
No lazy load
Lazy load on scroll (specify off-set)
Lazy load on "load reviews click"

Lay load options to select if everything should be lazy-loaded or just one or another widget should etc.

It would improve performance and rendering (TTFB, FCP, and FMP) as the browser won't render and calculate the doc as the divs and images and style + js aren't loaded until it's used and needed. As it's not a part of the DOM until it's needed.

Review details disappeared from client webiste

Good morning,

a client complained about disappearing reviews. I checked his own website and it seems that all the "Review details" are disappeared:
deprijs01

He claimed that are always been visible but he doesn't know when are disappeared.
If you need it, I can provide you the full login credentials.
Could you please take a look? I can't find any solution related to this issue.

Greetings,

Matteo

Summary recalculation problem

I'm having an issue where summaries that include multiple categories and summaries that only include one category aren't recalculating properly. When using the recalculate button under tools, it seems to toggle between one being correct and the other being correct. I recorded a screencast that demonstrates this behavior.

https://youtu.be/dF2a9Ts5Qm8

Issue with assets path in local development

I am currently using the latest version of the plugin.

The assets path is broken in local development.

I am using Local by Flywheel in Windows 10 OS.
Previous version of the plugin was working in my setup.

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.