78% wp-yelp-review-slider

Code Review | WP Yelp Review Slider

WordPress plugin WP Yelp Review Slider scored78%from 54 tests.

About plugin

  • Plugin page: wp-yelp-review-sl...
  • Plugin version: 7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Aug 16, 2023
  • Number of updates: 105
  • Update frequency: every 22.3 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

2,000+ active /40,528 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.53MB] [CPU: ▼5.88ms] Passed 4 tests

Analyzing server-side resources used by WP Yelp Review Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5444.41 ▲8.13
Dashboard /wp-admin3.85 ▲0.5151.59 ▼8.47
Posts /wp-admin/edit.php3.90 ▲0.5544.66 ▲1.10
Add New Post /wp-admin/post-new.php6.43 ▲0.5582.23 ▼19.31
Media Library /wp-admin/upload.php3.78 ▲0.5538.07 ▲3.15
Get Yelp Reviews /wp-admin/admin.php?page=wp_yelp-get_yelp3.6937.73
Templates /wp-admin/admin.php?page=wp_yelp-templates_posts3.9434.55
Review List /wp-admin/admin.php?page=wp_yelp-reviews3.7433.85

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 65 new files
Database: 2 new tables, 10 new options
New tables
wp_wpyelp_post_templates
wp_wpyelp_reviews
New WordPress options
wp-yelp-review-slider_version
wprev_activated_time_yelp
widget_recent-posts
wp-yelp-review-slider_current_db_version
widget_theysaidso_widget
widget_wpyelp_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Yelp Review Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲22313.47 ▲0.219.70 ▲8.1343.35 ▲2.96
Dashboard /wp-admin2,273 ▲965.54 ▼0.1499.31 ▲16.0341.94 ▼0.71
Posts /wp-admin/edit.php2,139 ▲391.99 ▼0.0233.81 ▼0.6032.25 ▼0.75
Add New Post /wp-admin/post-new.php1,558 ▲2923.30 ▲0.15649.20 ▲31.6961.65 ▲5.16
Media Library /wp-admin/upload.php1,439 ▲364.15 ▼0.12101.24 ▲4.1344.91 ▲0.22
Get Yelp Reviews /wp-admin/admin.php?page=wp_yelp-get_yelp9051.7027.1526.68
Templates /wp-admin/admin.php?page=wp_yelp-templates_posts2,0623.1771.6926.86
Review List /wp-admin/admin.php?page=wp_yelp-reviews9551.8634.1025.68

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: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • wp-yelp-review-slider_current_db_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_yelp-get_yelp
    • > Notice in wp-content/plugins/wp-yelp-review-slider/admin/class-wp-yelp-review-slider-admin.php+320
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_query_arg() in wp-content/plugins/wp-yelp-review-slider/admin/partials/tabmenu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-yelp-review-slider/admin/partials/review_list.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-yelp-review-slider/public/partials/wp-yelp-review-slider-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-yelp-review-slider/public/partials/wp-yelp-review-slider-public-display.php:23
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-yelp-review-slider/public/partials/wp-yelp-review-slider-public-display-widget.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-yelp-review-slider/public/partials/wp-yelp-review-slider-public-display-widget.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-yelp-review-slider/admin/partials/get_yelp.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-yelp-review-slider/public/class-wp-yelp-review-slider-widget.php:6
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-yelp-review-slider/public/partials/wp-yelp-review-slider-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-yelp-review-slider/public/partials/template_style_1.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-yelp-review-slider === )
The official readme.txt might help

wp-yelp-review-slider/wp-yelp-review-slider.php Passed 13 tests

The principal PHP file in "WP Yelp Review Slider" v. 7.3 is loaded by WordPress automatically on each request
100 characters long description:
Allows you to easily display your Yelp Business Page reviews in your Posts, Pages, and Widget areas.

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
No dangerous file extensions were detected5,719 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP217831,4373,852
JavaScript93206741,403
CSS52120464

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity45.27
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods147
▷ Static methods53.40%
▷ Public methods12383.67%
▷ Protected methods1610.88%
▷ Private methods85.44%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 0.30MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/template2_thumb.png26.88KB9.18KB▼ 65.86%
admin/partials/icon-128x128.png18.30KB2.65KB▼ 85.54%
public/partials/imgs/yelp_stars_3.png4.11KB1.38KB▼ 66.32%
public/partials/imgs/yelp_stars_4.png4.14KB1.34KB▼ 67.60%
public/partials/imgs/yelp_stars_2.5.png4.37KB1.61KB▼ 63.05%