84% yelp-widget-pro

Code Review | Reviews Block for Yelp

WordPress plugin Reviews Block for Yelp scored84%from 54 tests.

About plugin

  • Plugin page: yelp-widget-pro
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 9, 2012
  • Latest release: May 30, 2022
  • Number of updates: 85
  • Update frequency: every 41.1 days
  • Top authors: dlocc (92.94%)webdevmattcrom (8.24%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /67,832 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: ▲0.09MB] [CPU: ▼0.97ms] Passed 4 tests

This is a short check of server-side resources used by Reviews Block for Yelp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.27 ▼0.41
Dashboard /wp-admin3.39 ▲0.0943.35 ▼1.98
Posts /wp-admin/edit.php3.45 ▲0.0945.33 ▼0.83
Add New Post /wp-admin/post-new.php5.98 ▲0.1091.48 ▼0.66
Media Library /wp-admin/upload.php3.32 ▲0.0935.69 ▲2.74
Yelp Reviews /wp-admin/options-general.php?page=yelp_widget3.2932.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 102 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reviews Block for Yelp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.001.74 ▲0.1843.60 ▲2.40
Dashboard /wp-admin2,196 ▲165.51 ▼0.1482.19 ▼2.9437.75 ▼6.28
Posts /wp-admin/edit.php2,101 ▲12.00 ▼0.0235.17 ▲1.3032.67 ▼3.51
Add New Post /wp-admin/post-new.php6,371 ▲4,84528.40 ▲5.52916.91 ▲242.0040.36 ▼16.05
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0194.16 ▼15.0646.16 ▲1.37
Yelp Reviews /wp-admin/options-general.php?page=yelp_widget9591.6724.7136.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yelp-widget-pro/src/class-yelp-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yelp-widget-pro/src/admin-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/yelp-widget-pro/yelp-widget-pro.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yelp-widget-pro/src/block/serverside.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yelp-widget-pro/src/plugin-listing-page.php:175

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: reviews, yelp reviews, yelp block, yelp

yelp-widget-pro/yelp-widget-pro.php Passed 13 tests

Analyzing the main PHP file in "Reviews Block for Yelp" version 3.0.0
93 characters long description:
Easily display Yelp business reviews and ratings with a simple and intuitive WordPress block.

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 detected3,960 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
Sass10276231,338
JavaScript18129901,325
PHP92553211,113
SVG511102
JSON30078
CSS4004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity16.00
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
50 PNG files occupy 0.65MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/stars/regular_1.png0.79KB0.63KB▼ 20.52%
assets/images/blank-biz.png1.07KB0.81KB▼ 24.77%
assets/images/stars/regular_4.png0.80KB0.63KB▼ 20.95%
assets/images/stars/regular_5@3x.png1.94KB1.08KB▼ 44.24%
assets/images/stars/regular_5.png0.56KB0.39KB▼ 29.17%