78% wp-zillow-review-slider

Code Review | WP Zillow Review Slider

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

About plugin

  • Plugin page: wp-zillow-review-...
  • Plugin version: 2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 43
  • Update frequency: every 40.1 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /10,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.49MB] [CPU: ▼5.17ms] Passed 4 tests

Analyzing server-side resources used by WP Zillow Review Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5245.29 ▲3.93
Dashboard /wp-admin3.82 ▲0.5255.13 ▼3.54
Posts /wp-admin/edit.php3.87 ▲0.5252.31 ▲0.44
Add New Post /wp-admin/post-new.php6.34 ▲0.4691.06 ▼21.49
Media Library /wp-admin/upload.php3.68 ▲0.4641.34 ▲4.50
Review List /wp-admin/admin.php?page=wp_zillow-reviews3.7040.33
Get Zillow Reviews /wp-admin/admin.php?page=wp_zillow-get_zillow3.6634.35
Templates /wp-admin/admin.php?page=wp_zillow-templates_posts3.8336.97

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 62 new files
Database: 2 new tables, 10 new options
New tables
wp_wpzillow_post_templates
wp_wpzillow_reviews
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
wprev_activated_time_zillow
wp-zillow-review-slider_version
widget_recent-comments
can_compress_scripts
wp-zillow-review-slider_current_db_version
widget_wpzillow_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Zillow Review Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲22313.44 ▼0.938.92 ▲7.2944.96 ▲3.39
Dashboard /wp-admin2,273 ▲925.61 ▼0.2286.48 ▼15.3740.12 ▼4.92
Posts /wp-admin/edit.php2,136 ▲391.99 ▼0.0137.77 ▲0.0334.29 ▼4.82
Add New Post /wp-admin/post-new.php1,558 ▲3023.58 ▲0.50701.06 ▲18.9659.30 ▲6.12
Media Library /wp-admin/upload.php1,442 ▲424.19 ▼0.02105.81 ▲4.4245.90 ▼0.40
Review List /wp-admin/admin.php?page=wp_zillow-reviews9031.8640.2328.46
Get Zillow Reviews /wp-admin/admin.php?page=wp_zillow-get_zillow8981.6925.4729.33
Templates /wp-admin/admin.php?page=wp_zillow-templates_posts2,0273.1578.0832.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • wp-zillow-review-slider_current_db_version
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_zillow-get_zillow
    • > Notice in wp-content/plugins/wp-zillow-review-slider/admin/class-wp-zillow-review-slider-admin.php+332
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-zillow-review-slider/public/partials/wp-zillow-review-slider-public-display-widget.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-zillow-review-slider/public/partials/wp-zillow-review-slider-public-display-widget.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-zillow-review-slider/public/partials/wp-zillow-review-slider-public-display.php:23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-zillow-review-slider/public/partials/template_style_1.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-zillow-review-slider/admin/partials/get_zillow.php:16
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-zillow-review-slider/public/partials/wp-zillow-review-slider-public-display.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-zillow-review-slider/admin/partials/review_list.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_query_arg() in wp-content/plugins/wp-zillow-review-slider/admin/partials/tabmenu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-zillow-review-slider/public/class-wp-zillow-review-slider-template_action.php:3
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-zillow-review-slider/public/partials/wp-zillow-review-slider-public-display.php on line 21

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-zillow-review-slider === )
The official readme.txt is a good inspiration

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

"WP Zillow Review Slider" version 2.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
102 characters long description:
Allows you to easily display your Zillow 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 an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin5,510 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP217431,3263,672
JavaScript83146711,371
CSS52220467

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.09
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods146
▷ Static methods53.42%
▷ Public methods11880.82%
▷ Protected methods1610.96%
▷ Private methods128.22%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.30MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/partials/imgs/stars_1.png6.56KB1.93KB▼ 70.57%
public/partials/imgs/stars_4.png6.73KB1.87KB▼ 72.14%
admin/partials/template3_thumb.png65.48KB18.84KB▼ 71.23%
public/partials/imgs/stars_0.png6.46KB1.90KB▼ 70.51%
admin/partials/logo.png16.21KB5.04KB▼ 68.90%