78% review-widgets-for-opentable

Code Review | Widgets for Opentable Reviews

WordPress plugin Widgets for Opentable 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: Jun 29, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 136
  • Update frequency: every 9.1 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /7,766 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: ▲1.12MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by Widgets for Opentable Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1246.67 ▲2.68
Dashboard /wp-admin4.46 ▲1.1154.44 ▼9.87
Posts /wp-admin/edit.php4.49 ▲1.1356.75 ▲5.92
Add New Post /wp-admin/post-new.php7.10 ▲1.2193.55 ▼8.92
Media Library /wp-admin/upload.php4.34 ▲1.1044.18 ▲9.52

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_opentable_reviews
New WordPress options
can_compress_scripts
trustindex-opentable-active
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
trustindex-opentable-version
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Widgets for Opentable Reviews: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.06 ▼0.641.74 ▲0.0339.11 ▼3.97
Dashboard /wp-admin2,217 ▲425.54 ▼0.15111.19 ▼2.7275.53 ▲32.89
Posts /wp-admin/edit.php2,122 ▲192.00 ▲0.0539.09 ▲0.5338.33 ▲3.58
Add New Post /wp-admin/post-new.php6,379 ▲4,85027.87 ▲4.61814.66 ▲226.8135.62 ▼14.86
Media Library /wp-admin/upload.php1,422 ▲224.10 ▼0.0798.83 ▲2.8574.33 ▲33.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/review-widgets-for-opentable/review-widgets-for-opentable.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/my_reviews.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/feature_request.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/setup_trustindex.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/review-widgets-for-opentable/trustindex-opentable-widget.class.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/rate.php
    • > /wp-content/plugins/review-widgets-for-opentable/tabs/get_reviews.php
    • > /wp-content/plugins/review-widgets-for-opentable/settings.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > 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-opentable/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_opentable' not found in wp-content/plugins/review-widgets-for-opentable/tabs/demo_widgets.php:6
    • > 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-opentable/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/review-widgets-for-opentable/include/troubleshooting.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-opentable/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_opentable' not found in wp-content/plugins/review-widgets-for-opentable/tabs/_rate_us_feedback.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-opentable/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-opentable/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-opentable/include/schema.php:4
    • > 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-opentable/include/activate.php on line 2

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 97% 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:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

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

This is the main PHP file of "Widgets for Opentable Reviews" version 11.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
Embed Opentable reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Opentable 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
There were no executable files found in this plugin10,475 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,281
JavaScript63011751,018
CSS413063
SVG42061
JSON10052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
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
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods98
▷ Static methods66.12%
▷ Public methods9697.96%
▷ Protected methods00.00%
▷ Private methods22.04%
Functions17
▷ Named functions847.06%
▷ Anonymous functions952.94%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.02MB 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/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/yes.png1.91KB0.25KB▼ 87.08%