78% wp-airbnb-review-slider

Code Review | WP Airbnb Review Slider

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

About plugin

  • Plugin page: wp-airbnb-review-...
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2018
  • Latest release: Aug 16, 2023
  • Number of updates: 51
  • Update frequency: every 35.7 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

2,000+ active /24,501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.53MB] [CPU: ▼7.53ms] Passed 4 tests

This is a short check of server-side resources used by WP Airbnb Review Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5240.40 ▼0.81
Dashboard /wp-admin3.85 ▲0.5052.72 ▼5.96
Posts /wp-admin/edit.php3.90 ▲0.5450.66 ▼0.70
Add New Post /wp-admin/post-new.php6.43 ▲0.5483.52 ▼22.63
Media Library /wp-admin/upload.php3.77 ▲0.5444.03 ▲9.86
Templates /wp-admin/admin.php?page=wp_airbnb-templates_posts3.8639.15
Welcome /wp-admin/admin.php?page=wp_airbnb-welcome3.6834.54
Review List /wp-admin/admin.php?page=wp_airbnb-reviews3.7336.55
Get Airbnb Reviews /wp-admin/admin.php?page=wp_airbnb-get_airbnb3.6832.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 64 new files
Database: 2 new tables, 8 new options
New tables
wp_wpairbnb_post_templates
wp_wpairbnb_reviews
New WordPress options
can_compress_scripts
db_upgraded
wp-airbnb-review-slider_version
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
wprev_activated_time_airbnb

Browser metrics Passed 4 tests

An overview of browser requirements for WP Airbnb Review Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21713.44 ▼1.048.09 ▲6.4337.42 ▼5.32
Dashboard /wp-admin2,280 ▲1035.69 ▲0.1489.20 ▲2.5936.23 ▼6.29
Posts /wp-admin/edit.php2,144 ▲442.01 ▼0.0142.98 ▲3.5935.50 ▲0.90
Add New Post /wp-admin/post-new.php1,560 ▲3423.20 ▲0.19651.98 ▼30.3974.42 ▲20.40
Media Library /wp-admin/upload.php1,444 ▲444.18 ▼0.03101.95 ▼3.5647.98 ▲2.98
Templates /wp-admin/admin.php?page=wp_airbnb-templates_posts2,0413.1474.6530.00
Welcome /wp-admin/admin.php?page=wp_airbnb-welcome8931.7323.7826.48
Review List /wp-admin/admin.php?page=wp_airbnb-reviews9481.8733.9326.44
Get Airbnb Reviews /wp-admin/admin.php?page=wp_airbnb-get_airbnb9001.7023.8322.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_airbnb-get_airbnb
    • > Notice in wp-content/plugins/wp-airbnb-review-slider/admin/class-wp-airbnb-review-slider-admin.php+330
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-airbnb-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-airbnb-review-slider/public/partials/wp-airbnb-review-slider-public-display-widget.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-airbnb-review-slider/public/class-wp-airbnb-review-slider-widget.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-airbnb-review-slider/public/partials/wp-airbnb-review-slider-public-display.php on line 21
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-airbnb-review-slider/public/partials/wp-airbnb-review-slider-public-display.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-airbnb-review-slider/public/partials/wp-airbnb-review-slider-public-display-widget.php:22
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/wp-airbnb-review-slider/public/partials/wp-airbnb-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-airbnb-review-slider/admin/partials/get_pro_new.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-airbnb-review-slider/admin/partials/welcome.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-airbnb-review-slider/admin/partials/get_pro.php:16

User-side errors Passed 1 test

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

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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-airbnb-review-slider === )
Please take inspiration from this readme.txt

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

"WP Airbnb Review Slider" version 3.5'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 Airbnb Business Page reviews in your Posts, Pages, and Widget areas.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected8,212 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP238341,5244,115
HTML11,96402,233
JavaScript93196741,402
CSS52220462

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity45.82
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods148
▷ Static methods53.38%
▷ Public methods12383.11%
▷ Protected methods1610.81%
▷ Private methods96.08%
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
16 PNG files occupy 0.28MB with 0.19MB 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%
public/partials/imgs/stars_4_yellow.png6.73KB1.87KB▼ 72.14%
public/partials/imgs/stars_5_yellow.png6.71KB1.90KB▼ 71.61%
public/partials/imgs/stars_3_yellow.png6.73KB1.91KB▼ 71.68%
admin/partials/template1_thumb.png27.86KB9.86KB▼ 64.61%