10% trustspot-reviews-for-woocommerce

Code Review | TrustSpot Reviews For Woocommerce

WordPress plugin TrustSpot Reviews For Woocommerce scored 10% from 54 tests.

About plugin

  • Plugin page: trustspot-reviews...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-6.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2017
  • Latest release: Nov 24, 2022
  • Number of updates: 18
  • Update frequency: every 118.2 days
  • Top authors: trustspot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,913 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/trustspot-reviews-for-woocommerce/woocommerce-trustspot.php+149
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.95ms] Passed 4 tests

An overview of server-side resources used by TrustSpot Reviews For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.01 ▼15.38
Dashboard /wp-admin3.31 ▲0.0063.07 ▲5.99
Posts /wp-admin/edit.php3.36 ▲0.0063.12 ▲7.98
Add New Post /wp-admin/post-new.php5.89 ▲0.00109.46 ▲5.95
Media Library /wp-admin/upload.php3.23 ▲0.0039.68 ▼4.35

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for TrustSpot Reviews For Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼013.21 ▼1.221.89 ▲0.1444.76 ▲1.52
Dashboard /wp-admin2,203 ▼64.85 ▼0.00114.51 ▲8.5444.84 ▲6.29
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0541.40 ▲3.9934.69 ▲0.86
Add New Post /wp-admin/post-new.php1,514 ▼1917.77 ▼5.18863.49 ▲237.5059.68 ▲5.99
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.13102.57 ▼8.7741.92 ▼2.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: video reviews, reviews, product reviews, woo reviews, photo reviews...

trustspot-reviews-for-woocommerce/woocommerce-trustspot.php 85% from 13 tests

Analyzing the main PHP file in "TrustSpot Reviews For Woocommerce" version 1.1
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("trustspot-reviews-for-woocommerce.php" instead of "woocommerce-trustspot.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin437 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17649437

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.89KB0.78KB▼ 13.10%
img/TS_Logo_Alternative_ForWhiteBG.png9.29KB4.54KB▼ 51.11%