78% review-widgets-for-capterra

Code Review | Widgets for Capterra Reviews

WordPress plugin Widgets for Capterra 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: Aug 26, 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

4 reviews

Install metrics

100+ active /13,247 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Widgets for Capterra Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.43 ▲2.30
Dashboard /wp-admin3.43 ▲0.1347.90 ▼2.40
Posts /wp-admin/edit.php3.53 ▲0.1750.73 ▲0.84
Add New Post /wp-admin/post-new.php6.14 ▲0.2588.94 ▼1.89
Media Library /wp-admin/upload.php3.37 ▲0.1439.30 ▲4.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_capterra_reviews
New WordPress options
trustindex-capterra-active
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
trustindex-capterra-version
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Widgets for Capterra Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.32 ▲0.011.75 ▲0.0540.92 ▼3.00
Dashboard /wp-admin2,217 ▲395.73 ▲0.0191.85 ▼23.1679.10 ▲34.64
Posts /wp-admin/edit.php2,119 ▲371.98 ▼0.0239.94 ▼5.0134.19 ▼7.13
Add New Post /wp-admin/post-new.php6,213 ▲4,68426.33 ▲2.96975.31 ▲304.1244.41 ▼10.34
Media Library /wp-admin/upload.php1,419 ▲224.14 ▼0.02112.81 ▲11.6279.45 ▲35.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

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× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/advanced.php
    • > /wp-content/plugins/review-widgets-for-capterra/settings.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/my_reviews.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/get_reviews.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/setup_trustindex.php
    • > /wp-content/plugins/review-widgets-for-capterra/review-widgets-for-capterra.php
    • > /wp-content/plugins/review-widgets-for-capterra/tabs/feature_request.php
    • > /wp-content/plugins/review-widgets-for-capterra/trustindex-capterra-widget.class.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_capterra' not found in wp-content/plugins/review-widgets-for-capterra/tabs/demo_widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-capterra/include/schema.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_capterra' not found in wp-content/plugins/review-widgets-for-capterra/tabs/_rate_us_feedback.php:2
    • > 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-capterra/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-capterra/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_capterra' not found in wp-content/plugins/review-widgets-for-capterra/tabs/_get_more_customers.php:1
    • > 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-capterra/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-capterra/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_capterra' not found in wp-content/plugins/review-widgets-for-capterra/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/review-widgets-for-capterra/include/activate.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

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

This is the main PHP file of "Widgets for Capterra 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
118 characters long description:
Embed Capterra reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Capterra reviews.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were 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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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/platforms.png10.24KB4.08KB▼ 60.12%
static/img/yes.png1.91KB0.25KB▼ 87.08%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/no.png1.92KB0.28KB▼ 85.53%