78% reviews-widgets

Code Review | Widgets for Wordpress Reviews

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

About plugin

  • Plugin page: reviews-widgets
  • 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 4, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 85
  • Update frequency: every 11.0 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /6,693 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.07MB] [CPU: ▲1.78ms] Passed 4 tests

Analyzing server-side resources used by Widgets for Wordpress Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0751.40 ▲8.40
Dashboard /wp-admin4.40 ▲1.0656.22 ▼4.58
Posts /wp-admin/edit.php4.44 ▲1.0857.04 ▲10.32
Add New Post /wp-admin/post-new.php7.05 ▲1.1691.28 ▼4.78
Media Library /wp-admin/upload.php4.28 ▲1.0544.31 ▲8.06

Server storage [IO: ▲3.25MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_wordpressPlugin_reviews
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
trustindex-wordpressPlugin-active
trustindex-wordpressPlugin-version
can_compress_scripts

Browser metrics Passed 4 tests

Widgets for Wordpress Reviews: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6214.27 ▼0.081.74 ▼0.0439.98 ▼2.67
Dashboard /wp-admin2,214 ▲345.70 ▲0.0492.48 ▼0.7578.61 ▲37.42
Posts /wp-admin/edit.php2,125 ▲251.98 ▲0.0139.11 ▼1.3435.28 ▼0.52
Add New Post /wp-admin/post-new.php6,211 ▲4,68519.00 ▼4.20878.68 ▲216.9735.42 ▼22.48
Media Library /wp-admin/upload.php1,422 ▲254.26 ▲0.0499.54 ▲0.5179.57 ▲38.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
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/reviews-widgets/settings.php
    • > /wp-content/plugins/reviews-widgets/tabs/my_reviews.php
    • > /wp-content/plugins/reviews-widgets/tabs/rate.php
    • > /wp-content/plugins/reviews-widgets/tabs/advanced.php
    • > /wp-content/plugins/reviews-widgets/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/reviews-widgets/trustindex-wordpressPlugin-widget.class.php
    • > /wp-content/plugins/reviews-widgets/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/reviews-widgets/reviews-widgets.php
    • > /wp-content/plugins/reviews-widgets/tabs/get_reviews.php
    • > /wp-content/plugins/reviews-widgets/tabs/feature_request.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reviews-widgets/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_wordpressPlugin' not found in wp-content/plugins/reviews-widgets/tabs/_rate_us_feedback.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/reviews-widgets/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_wordpressPlugin' not found in wp-content/plugins/reviews-widgets/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/reviews-widgets/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/reviews-widgets/tabs/setup_no_reg.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/reviews-widgets/include/activate.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/reviews-widgets/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/reviews-widgets/include/troubleshooting.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_wordpressPlugin' not found in wp-content/plugins/reviews-widgets/tabs/demo_widgets.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Sample widget - List (light background)) image required
Please take inspiration from this readme.txt

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

The main PHP file in "Widgets for Wordpress Reviews" ver. 11.1 adds more information about the plugin and also serves as the entry point for this plugin
127 characters long description:
Embed Wordpress Plugin reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Wordpress 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
Good job! No executable or dangerous file extensions detected10,479 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,285
JavaScript63011751,018
CSS413063
SVG42061
JSON10052

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
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/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/yes.png1.91KB0.25KB▼ 87.08%