83% trustami-badge-for-customer-reviews-and-google-stars

Code Review | Trustami Badge for Customer Reviews and Google Stars

WordPress plugin Trustami Badge for Customer Reviews and Google Stars scored83%from 54 tests.

About plugin

  • Plugin page: trustami-badge-fo...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Aug 2, 2023
  • Number of updates: 32
  • Update frequency: every 44.9 days
  • Top authors: trustami (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,007 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: ▲0.29MB] [CPU: ▼1.73ms] Passed 4 tests

A check of server-side resources used by Trustami Badge for Customer Reviews and Google Stars
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3443.52 ▲3.46
Dashboard /wp-admin3.62 ▲0.3249.47 ▼4.13
Posts /wp-admin/edit.php3.67 ▲0.3157.44 ▲6.11
Add New Post /wp-admin/post-new.php6.16 ▲0.2799.49 ▼5.32
Media Library /wp-admin/upload.php3.48 ▲0.2536.97 ▼0.94

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 17 new options
New WordPress options
widget_wc_trustami_widget_box
widget_theysaidso_widget
widget_wc_trustami_widget_button
widget_wc_trustami_widget_badge
widget_wc_trustami_widget_shopauskunft
widget_wc_trustami_widget_comments
widget_wc_trustami_widget_text
widget_wc_trustami_widget_social
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

Trustami Badge for Customer Reviews and Google Stars: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.83 ▲0.081.74 ▲0.1741.64 ▲0.11
Dashboard /wp-admin2,210 ▲365.86 ▼0.01108.73 ▼17.7838.42 ▼21.20
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0354.18 ▲11.5736.67 ▲1.33
Add New Post /wp-admin/post-new.php1,518 ▼2420.95 ▼1.82706.07 ▲63.1960.60 ▼0.40
Media Library /wp-admin/upload.php1,389 ▼24.18 ▼0.01105.55 ▲1.2447.40 ▲0.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 17 options in the database
    • can_compress_scripts
    • widget_wc_trustami_widget_sticker
    • widget_theysaidso_widget
    • widget_wc_trustami_widget_duo
    • widget_recent-posts
    • widget_wc_trustami_widget_button
    • widget_wc_trustami_widget_stars
    • theysaidso_admin_options
    • widget_wc_trustami_widget_box
    • widget_wc_trustami_widget_badge
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/trustami-badge-for-customer-reviews-and-google-stars/admin/partials/trustami-admin-display.php
    • > /wp-content/plugins/trustami-badge-for-customer-reviews-and-google-stars/public/partials/trustami-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

trustami-badge-for-customer-reviews-and-google-stars/trustami.php 85% from 13 tests

Analyzing the main PHP file in "Trustami Badge for Customer Reviews and Google Stars" version 1.0.9
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("trustami-badge-for-customer-reviews-and-google-stars.php" instead of "trustami.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 356 characters long)

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
There were no executable files found in this plugin1,031 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP242581,014860
PO File1750163
CSS1145
JavaScript12273

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.11
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods77
▷ Static methods79.09%
▷ Public methods7293.51%
▷ Protected methods00.00%
▷ Private methods56.49%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin