78% review-widgets-for-bookatable

Code Review | Widgets for Bookatable Reviews

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

About plugin

  • Plugin page: review-widgets-fo...
  • Plugin version: 6.8.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2020
  • Latest release: Aug 25, 2021
  • Number of updates: 63
  • Update frequency: every 6.5 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▼6.76ms] Passed 4 tests

A check of server-side resources used by Widgets for Bookatable Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4239.90 ▲0.88
Dashboard /wp-admin3.77 ▲0.4245.75 ▼13.41
Posts /wp-admin/edit.php3.87 ▲0.5152.10 ▲2.81
Add New Post /wp-admin/post-new.php6.48 ▲0.5985.23 ▼15.28
Media Library /wp-admin/upload.php3.72 ▲0.5034.21 ▲0.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 99 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
trustindex-bookatable-active
widget_recent-comments
trustindex-bookatable-version
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widgets for Bookatable Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8714.17 ▼0.381.61 ▲0.0141.59 ▲0.74
Dashboard /wp-admin2,254 ▲735.62 ▼0.0985.58 ▼13.0790.70 ▲47.62
Posts /wp-admin/edit.php2,163 ▲632.02 ▼0.0141.06 ▲0.3935.40 ▼2.26
Add New Post /wp-admin/post-new.php6,427 ▲4,89822.60 ▼0.44901.54 ▲274.2037.71 ▼12.98
Media Library /wp-admin/upload.php1,462 ▲594.16 ▼0.0797.67 ▼7.0078.17 ▲30.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/review-widgets-for-bookatable/plugin-load.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/troubleshooting.php
    • > /wp-content/plugins/review-widgets-for-bookatable/settings.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/rate.php
    • > /wp-content/plugins/review-widgets-for-bookatable/review-widgets-for-bookatable.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/setup_trustindex.php
    • > /wp-content/plugins/review-widgets-for-bookatable/trustindex-bookatable-widget.class.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/review-widgets-for-bookatable/tabs/my_reviews.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin' not found in wp-content/plugins/review-widgets-for-bookatable/tabs/get_reviews.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin' not found in wp-content/plugins/review-widgets-for-bookatable/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-bookatable/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-bookatable/tabs/setup_no_reg.php:1

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)
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

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

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

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
There were no executable files found in this plugin4,757 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP1643344,711
SVG40027
CSS32012
JavaScript7007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity82.33
▷ Minimum class complexity9.00
▷ Maximum class complexity214.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods74
▷ Static methods45.41%
▷ Public methods7398.65%
▷ Protected methods00.00%
▷ Private methods11.35%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
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
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/trustindex-sign-logo.png0.68KB0.46KB▼ 32.04%
static/img/yes.png1.91KB0.25KB▼ 87.08%