10% yelp-reviews-ticker

Code Review | Yelp Reviews Ticker

WordPress plugin Yelp Reviews Ticker scored10%from 54 tests.

About plugin

  • Plugin page: yelp-reviews-ticker
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2013
  • Latest release: Mar 19, 2014
  • Number of updates: 21
  • Update frequency: every 18.9 days
  • Top authors: flaviodj (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /9,139 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/yelp-reviews-ticker/yrt.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; yrtWidget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.60ms] Passed 4 tests

This is a short check of server-side resources used by Yelp Reviews Ticker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.306.42 ▼34.08
Dashboard /wp-admin2.18 ▼1.126.36 ▼41.87
Posts /wp-admin/edit.php2.18 ▼1.185.63 ▼45.17
Add New Post /wp-admin/post-new.php2.18 ▼3.716.21 ▼97.26
Media Library /wp-admin/upload.php2.18 ▼1.055.77 ▼27.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_yrtwidget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Yelp Reviews Ticker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.70 ▼0.925.02 ▲3.4138.82 ▼8.77
Dashboard /wp-admin2,206 ▲155.85 ▲0.9998.58 ▼6.2639.43 ▼5.25
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0238.30 ▼0.9536.35 ▼0.66
Add New Post /wp-admin/post-new.php1,514 ▼2817.67 ▼0.46625.16 ▼11.3250.33 ▼22.74
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0196.11 ▼11.6543.52 ▼6.79

Uninstaller [IO: ▲0.00MB] [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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/yelp-reviews-ticker/yrt.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; yrtWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_yrtwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yelp-reviews-ticker/yrt.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

yelp-reviews-ticker/yrt.php 92% from 13 tests

The entry point to "Yelp Reviews Ticker" version 2.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yelp-reviews-ticker.php" instead of "yrt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin554 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15064315
CSS222137
JavaScript105102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity14.25
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rating.png0.09KB0.09KB0.00%
images/miniMapLogo.png0.69KB0.50KB▼ 26.92%
images/yelp_logo_50x25.png87.57KB1.72KB▼ 98.04%
images/stars_map.png7.42KB3.78KB▼ 49.03%