78% widgets-for-alibaba-reviews

Code Review | Widgets for Alibaba Reviews

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

About plugin

  • Plugin page: widgets-for-aliba...
  • 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 19, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 87
  • Update frequency: every 10.7 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,425 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Widgets for Alibaba Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.25 ▲5.00
Dashboard /wp-admin3.43 ▲0.1351.36 ▲2.52
Posts /wp-admin/edit.php3.53 ▲0.1750.53 ▲2.40
Add New Post /wp-admin/post-new.php6.14 ▲0.2577.89 ▼10.52
Media Library /wp-admin/upload.php3.37 ▲0.1436.03 ▲2.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Widgets for Alibaba Reviews
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.26 ▼0.011.69 ▼0.0242.91 ▼0.96
Dashboard /wp-admin2,214 ▲345.66 ▲0.0693.12 ▲4.7492.44 ▲49.88
Posts /wp-admin/edit.php2,119 ▲222.00 ▼0.0136.37 ▼3.5235.19 ▲1.31
Add New Post /wp-admin/post-new.php6,379 ▲4,85227.67 ▲4.44914.07 ▲271.4338.15 ▼12.67
Media Library /wp-admin/upload.php1,422 ▲194.22 ▲0.0698.06 ▼2.4279.07 ▲35.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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
Please fix the following items
  • 11× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/setup_trustindex.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/trustindex-alibaba-widget.class.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/advanced.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/settings.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/my_reviews.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/rate.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/tabs/feature_request.php
    • > /wp-content/plugins/widgets-for-alibaba-reviews/widgets-for-alibaba-reviews.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_alibaba' not found in wp-content/plugins/widgets-for-alibaba-reviews/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgets-for-alibaba-reviews/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-alibaba-reviews/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/widgets-for-alibaba-reviews/include/troubleshooting.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/widgets-for-alibaba-reviews/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_alibaba' not found in wp-content/plugins/widgets-for-alibaba-reviews/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-alibaba-reviews/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-alibaba-reviews/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_alibaba' not found in wp-content/plugins/widgets-for-alibaba-reviews/tabs/_rate_us_feedback.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-alibaba-reviews/include/schema.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "Widgets for Alibaba Reviews" version 11.1
116 characters long description:
Embed Alibaba reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Alibaba 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
There were no executable files found in this plugin10,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
All good! No complexity issues found
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/yes.png1.91KB0.25KB▼ 87.08%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/no.png1.92KB0.28KB▼ 85.53%
static/img/platforms.png10.24KB4.08KB▼ 60.12%