89% trustmeup-connector

Code Review | TrustMeUp WooCommerce Connector

WordPress plugin TrustMeUp WooCommerce Connector scored89%from 54 tests.

About plugin

  • Plugin page: trustmeup-connector
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Apr 28, 2023
  • Number of updates: 21
  • Update frequency: every 34.4 days
  • Top authors: rbaucetmu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /766 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.62ms] Passed 4 tests

A check of server-side resources used by TrustMeUp WooCommerce Connector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.02 ▲2.21
Dashboard /wp-admin3.36 ▲0.0550.06 ▼2.58
Posts /wp-admin/edit.php3.47 ▲0.1148.88 ▲1.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.95 ▼6.29
Media Library /wp-admin/upload.php3.28 ▲0.0536.14 ▲0.57

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for TrustMeUp WooCommerce Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9013.27 ▼0.952.57 ▲0.8743.92 ▲1.99
Dashboard /wp-admin2,244 ▲385.84 ▲0.95102.43 ▲4.1639.14 ▼3.59
Posts /wp-admin/edit.php2,129 ▲292.15 ▲0.1535.77 ▲0.3935.35 ▲0.99
Add New Post /wp-admin/post-new.php1,564 ▲3823.26 ▲5.59608.96 ▼75.9259.34 ▲1.54
Media Library /wp-admin/upload.php1,432 ▲324.23 ▲0.0398.78 ▼6.3445.69 ▼3.88

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #2, #3, #4, #5, #6 in trustmeup-connector/assets to your readme.txt
You can look at the official readme.txt

trustmeup-connector/trustmeup.php 77% from 13 tests

The main PHP file in "TrustMeUp WooCommerce Connector" ver. 1.4.6 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "4.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("trustmeup-connector.php" instead of "trustmeup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin15,891 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
JSON70011,013
PHP376301,4722,308
JavaScript241132371,104
PO File2189210508
Sass110120459
CSS2218197
Markdown31020187
XML29396
YAML10012
SVG3007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.62
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods109
▷ Static methods2522.94%
▷ Public methods9486.24%
▷ Protected methods1110.09%
▷ Private methods43.67%
Functions65
▷ Named functions5686.15%
▷ Anonymous functions913.85%
Constants14
▷ Global constants750.00%
▷ Class constants750.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/trustmeup-icon.png6.17KB2.58KB▼ 58.23%