67% widget-yelp-reviews

Code Review | Widget for Yelp Reviews

WordPress plugin Widget for Yelp Reviews scored 67% from 54 tests.

About plugin

  • Plugin page: widget-yelp-reviews
  • Plugin version: 1.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2017
  • Latest release: May 24, 2023
  • Number of updates: 51
  • Update frequency: every 44.6 days
  • Top authors: widgetpack (92.16%)richplugins (9.8%)

Code review

54 tests

User reviews

41 reviews

Install metrics

4,000+ active / 66,875 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▲1.05ms] Passed 4 tests

This is a short check of server-side resources used by Widget for Yelp Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.01 ▼7.24
Dashboard /wp-admin3.33 ▲0.0254.69 ▼1.87
Posts /wp-admin/edit.php3.38 ▲0.0273.47 ▲18.04
Add New Post /wp-admin/post-new.php5.91 ▲0.02108.53 ▲15.19
Media Library /wp-admin/upload.php3.25 ▲0.0235.95 ▼1.87
Yelp Reviews Widget /wp-admin/options-general.php?page=yrw3.34236.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: 2 new tables, 13 new options
New tables
wp_yrw_yelp_review
wp_yrw_yelp_business
New WordPress options
theysaidso_admin_options
can_compress_scripts
yrw_active
db_upgraded
widget_yrw_widget
rplg_rev_notice_show
widget_theysaidso_widget
yrw_api_key
yrw_version
yrw_activation_time
...

Browser metrics Passed 4 tests

A check of browser resources used by Widget for Yelp Reviews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲4113.28 ▲0.062.00 ▼0.0348.39 ▲3.36
Dashboard /wp-admin2,214 ▲114.92 ▲0.09109.47 ▼4.1339.14 ▼3.74
Posts /wp-admin/edit.php2,100 ▲142.06 ▲0.0239.77 ▲4.9836.54 ▲3.75
Add New Post /wp-admin/post-new.php1,521 ▲723.23 ▲5.58701.00 ▼103.2653.95 ▲0.50
Media Library /wp-admin/upload.php1,393 ▲24.33 ▲0.1196.05 ▼8.0841.00 ▼1.50
Yelp Reviews Widget /wp-admin/options-general.php?page=yrw2,46619.61707.6673.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_yrw_yelp_business
    • wp_yrw_yelp_review
  • Zombie WordPress options detected upon uninstall: 13 options
    • rplg_rev_notice_show
    • widget_recent-posts
    • widget_yrw_widget
    • yrw_activation_time
    • widget_recent-comments
    • yrw_is_multisite
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • yrw_active
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function yrw_i() in wp-content/plugins/widget-yelp-reviews/yrw-finder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/widget-yelp-reviews/yrw-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function yrw_i() in wp-content/plugins/widget-yelp-reviews/yrw-options.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=yrw
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #3 (Yelp Reviews sidebar) image not found
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: A description for screenshot #2 is missing in widget-yelp-reviews/assets to your readme.txt
You can look at the official readme.txt

widget-yelp-reviews/yrw.php 92% from 13 tests

"Widget for Yelp Reviews" version 1.7.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widget-yelp-reviews.php" instead of "yrw.php")

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 plugin2,469 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9208391,371
CSS3995569
JavaScript4523526
SVG1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/yelp-avatar.png1.33KB0.91KB▼ 31.53%
static/img/yelp-logo.png2.32KB1.88KB▼ 19.02%