78% widgets-for-thumbtack-reviews

Code Review | Widgets for Thumbtack Reviews

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

About plugin

  • Plugin page: widgets-for-thumb...
  • 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: Sep 2, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 126
  • Update frequency: every 9.4 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /15,776 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.68ms] Passed 4 tests

A check of server-side resources used by Widgets for Thumbtack Reviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.39 ▲5.21
Dashboard /wp-admin3.43 ▲0.1349.66 ▲0.17
Posts /wp-admin/edit.php3.53 ▲0.1751.04 ▼1.46
Add New Post /wp-admin/post-new.php6.14 ▲0.2582.54 ▼14.40
Media Library /wp-admin/upload.php3.37 ▲0.1441.44 ▲4.98

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_thumbtack_reviews
New WordPress options
widget_theysaidso_widget
widget_recent-comments
trustindex-thumbtack-active
trustindex-thumbtack-version
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Widgets for Thumbtack Reviews
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.66 ▼0.041.72 ▲0.0446.11 ▼4.49
Dashboard /wp-admin2,214 ▲405.59 ▼0.0094.37 ▲4.8872.48 ▲32.37
Posts /wp-admin/edit.php2,125 ▲251.99 ▲0.0338.92 ▼3.4135.15 ▲1.08
Add New Post /wp-admin/post-new.php6,379 ▲4,85327.84 ▲5.01942.48 ▲266.2940.86 ▼32.40
Media Library /wp-admin/upload.php1,416 ▲164.18 ▲0.07100.24 ▼14.4974.15 ▲25.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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 items
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/settings.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/my_reviews.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/setup_trustindex.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/widgets-for-thumbtack-reviews.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/feature_request.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/trustindex-thumbtack-widget.class.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/rate.php
    • > /wp-content/plugins/widgets-for-thumbtack-reviews/tabs/advanced.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_thumbtack' not found in wp-content/plugins/widgets-for-thumbtack-reviews/tabs/demo_widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/widgets-for-thumbtack-reviews/include/troubleshooting.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgets-for-thumbtack-reviews/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_thumbtack' not found in wp-content/plugins/widgets-for-thumbtack-reviews/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-thumbtack-reviews/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_thumbtack' not found in wp-content/plugins/widgets-for-thumbtack-reviews/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-thumbtack-reviews/include/schema.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-thumbtack-reviews/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-thumbtack-reviews/include/uninstall.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/widgets-for-thumbtack-reviews/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)
Everything seems fine, but this is not an exhaustive test

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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

widgets-for-thumbtack-reviews/widgets-for-thumbtack-reviews.php Passed 13 tests

"Widgets for Thumbtack Reviews" version 11.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
Embed Thumbtack reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Thumbtack reviews.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected10,475 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,281
JavaScript63011751,018
CSS413063
SVG42061
JSON10052

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
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

Often times overlooked, PNG files can occupy unnecessary space in 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/yes.png1.91KB0.25KB▼ 87.08%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/platforms.png10.24KB4.08KB▼ 60.12%