78% review-widgets-for-szallas-hu

Code Review | Review Widgets for Szallas.hu

WordPress plugin Review Widgets for Szallas.hu 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: Sep 1, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 118
  • Update frequency: every 10.0 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲0.02ms] Passed 4 tests

Analyzing server-side resources used by Review Widgets for Szallas.hu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1247.65 ▲4.19
Dashboard /wp-admin4.46 ▲1.1154.06 ▼10.56
Posts /wp-admin/edit.php4.49 ▲1.1357.57 ▲8.62
Add New Post /wp-admin/post-new.php7.10 ▲1.2192.79 ▼2.19
Media Library /wp-admin/upload.php4.33 ▲1.1044.40 ▲10.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 141 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_szallashu_reviews
New WordPress options
theysaidso_admin_options
widget_recent-posts
trustindex-szallashu-active
widget_theysaidso_widget
can_compress_scripts
trustindex-szallashu-version
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Review Widgets for Szallas.hu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.28 ▼0.071.67 ▼0.0637.69 ▼9.68
Dashboard /wp-admin2,214 ▲345.75 ▲0.1298.64 ▲7.3075.42 ▲31.24
Posts /wp-admin/edit.php2,122 ▲251.96 ▲0.0239.97 ▲2.5335.21 ▼1.64
Add New Post /wp-admin/post-new.php6,379 ▲4,84427.59 ▲2.56893.19 ▲200.2436.58 ▼26.51
Media Library /wp-admin/upload.php1,419 ▲194.25 ▲0.0397.83 ▲2.3773.30 ▲31.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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 everything seems fine, this is not 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
  • 11× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/feature_request.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/my_reviews.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/advanced.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/settings.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/rate.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/setup_trustindex.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/tabs/get_reviews.php
    • > /wp-content/plugins/review-widgets-for-szallas-hu/review-widgets-for-szallas-hu.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/review-widgets-for-szallas-hu/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-szallas-hu/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_szallashu' not found in wp-content/plugins/review-widgets-for-szallas-hu/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_szallashu' not found in wp-content/plugins/review-widgets-for-szallas-hu/tabs/demo_widgets.php:6
    • > 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-szallas-hu/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-szallas-hu/include/troubleshooting.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_szallashu' not found in wp-content/plugins/review-widgets-for-szallas-hu/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/review-widgets-for-szallas-hu/include/schema.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_szallashu' not found in wp-content/plugins/review-widgets-for-szallas-hu/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-szallas-hu/uninstall.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

review-widgets-for-szallas-hu/review-widgets-for-szallas-hu.php Passed 13 tests

The primary PHP file in "Review Widgets for Szallas.hu" version 11.1 is used by WordPress to initiate all plugin functionality
121 characters long description:
Szállás.hu review widgets. Show your szallas.hu reviews on your WordPress website to build trust and increase your SEO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin11,156 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,281
JavaScript63011751,018
SVG11240742
CSS413063
JSON10052

PHP code Passed 2 tests

A short review 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

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/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/yes.png1.91KB0.25KB▼ 87.08%
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/platforms.png10.24KB4.08KB▼ 60.12%