79% reviews-widgets-for-yelp

Code Review | Widgets for Yelp Reviews

WordPress plugin Widgets for Yelp Reviews scored79%from 54 tests.

About plugin

  • Plugin page: reviews-widgets-f...
  • Plugin version: 11.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Nov 24, 2023
  • Number of updates: 173
  • Update frequency: every 8.4 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /26,343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.13MB] [CPU: ▲4.94ms] Passed 4 tests

Server-side resources used by Widgets for Yelp Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1252.05 ▲6.99
Dashboard /wp-admin4.46 ▲1.1552.15 ▲0.95
Posts /wp-admin/edit.php4.49 ▲1.1358.97 ▲11.06
Add New Post /wp-admin/post-new.php7.10 ▲1.2194.50 ▲0.77
Media Library /wp-admin/upload.php4.34 ▲1.1049.48 ▲14.83

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_yelp_reviews
New WordPress options
trustindex-yelp-version
trustindex-yelp-active
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Widgets for Yelp Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲4714.75 ▲0.481.81 ▼0.2436.81 ▼6.38
Dashboard /wp-admin2,202 ▲285.60 ▼0.0895.20 ▼35.2178.06 ▲34.89
Posts /wp-admin/edit.php2,122 ▲221.97 ▼0.0438.27 ▼3.1035.37 ▲1.58
Add New Post /wp-admin/post-new.php6,379 ▲4,85327.63 ▲4.15934.57 ▲264.5537.59 ▼24.69
Media Library /wp-admin/upload.php1,422 ▲224.12 ▼0.0599.83 ▲5.7080.14 ▲36.34

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 11× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/setup_trustindex.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/trustindex-yelp-widget.class.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/get_reviews.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/settings.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/feature_request.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/reviews-widgets-for-yelp.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/rate.php
    • > /wp-content/plugins/reviews-widgets-for-yelp/tabs/advanced.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reviews-widgets-for-yelp/include/uninstall.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/reviews-widgets-for-yelp/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_yelp' not found in wp-content/plugins/reviews-widgets-for-yelp/tabs/demo_widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/reviews-widgets-for-yelp/include/troubleshooting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/reviews-widgets-for-yelp/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reviews-widgets-for-yelp/include/schema.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_yelp' not found in wp-content/plugins/reviews-widgets-for-yelp/tabs/_rate_us_feedback.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_yelp' not found in wp-content/plugins/reviews-widgets-for-yelp/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/reviews-widgets-for-yelp/tabs/setup_no_reg.php:1
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/reviews-widgets-for-yelp/include/activate.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: reviews, yelp reviews, review, customer review, widget...

reviews-widgets-for-yelp/reviews-widgets-for-yelp.php Passed 13 tests

The main PHP script in "Widgets for Yelp Reviews" version 11.1 is automatically included on every request by WordPress
110 characters long description:
Embed Yelp reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Yelp reviews.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin10,474 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,281
JavaScript63011751,018
CSS413063
SVG32060
JSON10052

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity127.00
▷ Minimum class complexity10.00
▷ Maximum class complexity348.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods98
▷ Static methods66.12%
▷ Public methods9697.96%
▷ Protected methods00.00%
▷ Private methods22.04%
Functions17
▷ Named functions847.06%
▷ Anonymous functions952.94%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/yes.png1.91KB0.25KB▼ 87.08%
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%