10% unfiltered-yelp-reviews

Code Review | unFiltered

WordPress plugin unFiltered scored10%from 54 tests.

About plugin

  • Plugin page: unfiltered-yelp-r...
  • Plugin version: v1.0...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2012
  • Latest release: Jul 27, 2012
  • Number of updates: 9
  • Update frequency: every 2.7 days
  • Top authors: NolanD626 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,092 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; YelpReview has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.73ms] Passed 4 tests

An overview of server-side resources used by unFiltered
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.59 ▼38.90
Dashboard /wp-admin2.10 ▼1.216.36 ▼42.72
Posts /wp-admin/edit.php2.10 ▼1.265.36 ▼44.37
Add New Post /wp-admin/post-new.php2.10 ▼3.795.70 ▼80.93
Media Library /wp-admin/upload.php2.10 ▼1.136.26 ▼28.15
Reviews /wp-admin/edit.php?post_type=reviews2.105.50
New Review /wp-admin/post-new.php?post_type=reviews2.106.02

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_yelpreview
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for unFiltered
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.84 ▲0.491.76 ▲0.0147.24 ▼0.98
Dashboard /wp-admin2,217 ▲295.88 ▲0.98113.93 ▼1.9183.02 ▲35.77
Posts /wp-admin/edit.php2,115 ▲262.04 ▲0.0834.39 ▼4.3631.58 ▼1.35
Add New Post /wp-admin/post-new.php1,691 ▲15721.93 ▼1.25688.53 ▲18.6453.83 ▼3.58
Media Library /wp-admin/upload.php1,414 ▲234.19 ▼0.01109.43 ▲3.6046.19 ▲0.17
Reviews /wp-admin/edit.php?post_type=reviews1,0811.9630.8431.97
New Review /wp-admin/post-new.php?post_type=reviews1,4312.5149.3259.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; YelpReview has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_yelpreview
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Deprecated in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; YelpReview has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+18
    Trying to get property 'ID' of non-object
  • 33 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+29
    Trying to access array offset on value of type bool
  • 33 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/yelpreview.php+29
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in YelpReview is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+68
    Trying to get property 'post_type' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+129
    Undefined index: yelpcss
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+130
    Undefined index: reviewid
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+131
    Undefined index: reviewdate
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+132
    Undefined index: reviewstars
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+133
    Undefined index: reviewcomment
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+135
    Undefined index: reviewerid
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+136
    Undefined index: reviewerpic
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+137
    Undefined index: reviewername
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+138
    Undefined index: reviewerfriends
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+139
    Undefined index: reviewerreviews
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+140
    Undefined index: reviewercity
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+56
    Undefined variable: post_ID
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+55
    Undefined variable: post
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Notice in wp-content/plugins/unfiltered-yelp-reviews/review_type.php+55
    Trying to get property 'post_date' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=reviews
    • > Warning in wp-admin/includes/template.php+1443
    call_user_func() expects parameter 1 to be a valid callback, function 'reviews_metadata' not found or invalid function name

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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/unfiltered-yelp-reviews/themefiles/single-reviews.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unfiltered-yelp-reviews/review_type.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_custom() in wp-content/plugins/unfiltered-yelp-reviews/single-reviews.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unfiltered-yelp-reviews/review_type.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Facebook & Google Plus Integration), #2 (Install in any widget area), #3 (Admin functionality), #4 (Easy to use just cut and paste a few urls (user img and reviewer url) from each review you would like to post)
The official readme.txt might help

unfiltered-yelp-reviews/yelpreview.php 77% from 13 tests

The main file in "unFiltered" v. v1.0... serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 686 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("unfiltered-yelp-reviews.php" instead of "yelpreview.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "v1.0...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected456 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP49347419
CSS12037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 1.58MB with 1.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png190.88KB69.36KB▼ 63.66%
Screenshot4.png199.95KB71.55KB▼ 64.22%
Screenshot2.png219.71KB79.53KB▼ 63.80%
screenshot-2.png219.71KB79.53KB▼ 63.80%
Screenshot3.png190.88KB69.36KB▼ 63.66%