78% review-widgets-for-airbnb

Code Review | Widgets for Airbnb Reviews

WordPress plugin Widgets for Airbnb Reviews scored78%from 54 tests.

About plugin

  • Plugin page: review-widgets-fo...
  • Plugin version: 11.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 154
  • Update frequency: every 8.3 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

3,000+ active /69,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲0.78ms] Passed 4 tests

An overview of server-side resources used by Widgets for Airbnb Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1258.42 ▲17.87
Dashboard /wp-admin4.46 ▲1.1152.24 ▼10.35
Posts /wp-admin/edit.php4.49 ▲1.1355.85 ▲7.53
Add New Post /wp-admin/post-new.php7.10 ▲1.2185.92 ▼9.40
Media Library /wp-admin/upload.php4.34 ▲1.1047.47 ▲15.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 262 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_airbnb_reviews
New WordPress options
widget_recent-posts
trustindex-airbnb-active
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
trustindex-airbnb-version

Browser metrics Passed 4 tests

Widgets for Airbnb Reviews: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6214.13 ▼0.602.00 ▲0.3843.64 ▼0.48
Dashboard /wp-admin2,199 ▲185.68 ▼0.0297.26 ▼3.9289.08 ▲51.12
Posts /wp-admin/edit.php2,122 ▲221.99 ▲0.0237.72 ▼1.8434.32 ▼2.62
Add New Post /wp-admin/post-new.php6,379 ▲4,85327.69 ▲4.35912.16 ▲285.3041.72 ▼18.30
Media Library /wp-admin/upload.php1,413 ▲134.24 ▲0.08104.84 ▲7.9585.93 ▲43.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 22× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/review-widgets-for-airbnb/trunk/tabs/feature_request.php
    • > /wp-content/plugins/review-widgets-for-airbnb/trunk/settings.php
    • > /wp-content/plugins/review-widgets-for-airbnb/tabs/advanced.php
    • > /wp-content/plugins/review-widgets-for-airbnb/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/review-widgets-for-airbnb/trunk/tabs/rate.php
    • > /wp-content/plugins/review-widgets-for-airbnb/trunk/trustindex-airbnb-widget.class.php
    • > /wp-content/plugins/review-widgets-for-airbnb/tabs/get_reviews.php
    • > /wp-content/plugins/review-widgets-for-airbnb/trunk/tabs/advanced.php
    • > /wp-content/plugins/review-widgets-for-airbnb/tabs/setup_trustindex.php
    • > /wp-content/plugins/review-widgets-for-airbnb/tabs/setup_no_reg_header.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/review-widgets-for-airbnb/trunk/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-airbnb/uninstall.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/review-widgets-for-airbnb/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_airbnb' not found in wp-content/plugins/review-widgets-for-airbnb/trunk/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-airbnb/trunk/include/schema.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_airbnb' not found in wp-content/plugins/review-widgets-for-airbnb/trunk/tabs/demo_widgets.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/review-widgets-for-airbnb/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-airbnb/trunk/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-airbnb/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-airbnb/trunk/uninstall.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

review-widgets-for-airbnb/review-widgets-for-airbnb.php Passed 13 tests

The main PHP script in "Widgets for Airbnb Reviews" version 11.1 is automatically included on every request by WordPress
114 characters long description:
Embed Airbnb reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Airbnb reviews.

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
Everything looks great! No dangerous files found in this plugin10,476 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,283
JavaScript63011751,018
CSS413063
SVG32060
JSON10052

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity127.00
▷ Minimum class complexity10.00
▷ Maximum class complexity348.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods196
▷ Static methods126.12%
▷ Public methods19297.96%
▷ Protected methods00.00%
▷ Private methods42.04%
Functions34
▷ Named functions1647.06%
▷ Anonymous functions1852.94%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/yes.png1.91KB0.25KB▼ 87.08%
trunk/static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%