67% trust-reviews

Code Review | Trust Reviews plugin for Google, Tripadvisor, Yelp, Airbnb and other platforms

WordPress plugin Trust Reviews plugin for Google, Tripadvisor, Yelp, Airbnb and other platforms scored67%from 54 tests.

About plugin

  • Plugin page: trust-reviews
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.7
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: Apr 28, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: trustreviews (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /683 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.69MB] [CPU: ▼3.44ms] Passed 4 tests

This is a short check of server-side resources used by Trust Reviews plugin for Google, Tripadvisor, Yelp, Airbnb and other platforms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.5947.31 ▼4.56
Dashboard /wp-admin4.28 ▲0.7260.67 ▲3.04
Posts /wp-admin/edit.php4.40 ▲0.7254.70 ▲2.88
Add New Post /wp-admin/post-new.php6.88 ▲0.7492.59 ▼15.13
Media Library /wp-admin/upload.php4.20 ▲0.7143.14 ▲4.90
Settings /wp-admin/admin.php?page=trp-settings4.20292.95
Support /wp-admin/admin.php?page=trp-support4.1839.03
Builder /wp-admin/admin.php?page=trp-builder4.1946.58
Reviews /wp-admin/edit.php?post_type=trp_feed4.2647.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 64 new files
Database: 2 new tables, 11 new options
New tables
wp_trp_business
wp_trp_review
New WordPress options
trp_active
theysaidso_admin_options
db_upgraded
widget_trp_widget
trp_version
widget_recent-posts
can_compress_scripts
trp_auth_code
widget_theysaidso_widget
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Trust Reviews plugin for Google, Tripadvisor, Yelp, Airbnb and other platforms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.29 ▼0.012.04 ▲0.0544.65 ▼5.45
Dashboard /wp-admin2,231 ▲545.68 ▲0.0085.78 ▼3.7780.32 ▲32.02
Posts /wp-admin/edit.php2,155 ▲552.46 ▲0.4135.20 ▼6.1737.00 ▼1.61
Add New Post /wp-admin/post-new.php1,570 ▲4423.11 ▲5.58656.34 ▲8.4534.07 ▼22.72
Media Library /wp-admin/upload.php1,511 ▲1114.35 ▲0.0799.96 ▼12.3570.99 ▲23.10
Settings /wp-admin/admin.php?page=trp-settings1,1631.9626.1134.82
Support /wp-admin/admin.php?page=trp-support1,3141.9528.1556.54
Builder /wp-admin/admin.php?page=trp-builder1,7693.4248.9276.76
Reviews /wp-admin/edit.php?post_type=trp_feed1,2332.2932.1934.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_trp_review
    • wp_trp_business
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • widget_recent-posts
    • trp_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_trp_widget
    • trp_active
    • trp_is_multisite
    • ...

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/trust-reviews/includes/support-facebook.php
    • > /wp-content/plugins/trust-reviews/includes/support-google.php
    • > /wp-content/plugins/trust-reviews/includes/support-yelp.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 27
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 84
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/trust-reviews/includes/class-feed-widget.php:7
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 111
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 55
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 65
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 64
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 36
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 120
    • > PHP Warning
      Use of undefined constant TRP_PLUGIN_URL - assumed 'TRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/trust-reviews/includes/support-google.php on line 93

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

trust-reviews/trp.php 77% from 13 tests

This is the main PHP file of "Trust Reviews plugin for Google, Tripadvisor, Yelp, Airbnb and other platforms" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 78 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("trust-reviews.php" instead of "trp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected4,451 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP31574172,897
CSS415320868
JavaScript6109304683
SVG1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.31
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes13.85%
Methods163
▷ Static methods10.61%
▷ Public methods11570.55%
▷ Protected methods21.23%
▷ Private methods4628.22%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants12
▷ Global constants1083.33%
▷ Class constants216.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 0.50MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/menu_icon2.png0.53KB0.55KB0.00%
assets/img/google_key_7.png36.49KB17.80KB▼ 51.23%
assets/img/google_placeid_2.png34.97KB16.15KB▼ 53.83%
assets/img/logo.png2.50KB1.88KB▼ 24.64%
assets/img/logo-tp.png2.50KB1.88KB▼ 24.64%