10% trustedsite

Code Review | TrustedSite

WordPress plugin TrustedSite scored10%from 54 tests.

About plugin

  • Plugin page: trustedsite
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: Sep 25, 2023
  • Number of updates: 22
  • Update frequency: every 69.6 days
  • Top authors: trustedsitepatrick (90.91%)mcafeesecurenick (13.64%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active /34,305 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
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/trustedsite/lib/Trustedsite.php+59
    Undefined index: sitemap

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.19ms] Passed 4 tests

Analyzing server-side resources used by TrustedSite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.08 ▲1.69
Dashboard /wp-admin3.32 ▲0.0147.50 ▼1.53
Posts /wp-admin/edit.php3.37 ▲0.0145.67 ▼5.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.84 ▼7.00
Media Library /wp-admin/upload.php3.24 ▲0.0134.71 ▲0.84
TrustedSite /wp-admin/options-general.php?page=trustedsite-settings3.2731.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
trustedsite_active
db_upgraded
widget_theysaidso_widget
widget_recent-posts
trustedsite_plugin_error
trustedsite_robots_enable
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by TrustedSite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.28 ▼1.016.29 ▲4.5143.35 ▼0.83
Dashboard /wp-admin2,213 ▲254.84 ▼0.05101.08 ▼9.9537.97 ▼11.38
Posts /wp-admin/edit.php2,096 ▲102.03 ▲0.0534.15 ▼2.6630.89 ▼3.09
Add New Post /wp-admin/post-new.php1,536 ▼022.81 ▼0.51658.83 ▼9.3253.73 ▼3.56
Media Library /wp-admin/upload.php1,392 ▲104.20 ▼0.0697.39 ▼0.9642.01 ▼0.73
TrustedSite /wp-admin/options-general.php?page=trustedsite-settings1,3175.27110.4233.85

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • trustedsite_plugin_error
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

trustedsite/trustedsite.php Passed 13 tests

This is the main PHP file of "TrustedSite" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
Display TrustedSite trustmarks on your website to increase visitor confidence and conversion rates.

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
No dangerous file extensions were detected1,233 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP311811581
JavaScript1530330
CSS203322

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods26100.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/preview-64-banner.png45.58KB14.69KB▼ 67.78%
images/preview-64-engagement.png37.60KB11.07KB▼ 70.55%
images/preview-64-sip.png33.65KB10.39KB▼ 69.13%
images/preview-64-testimonials.png34.02KB10.83KB▼ 68.18%
images/preview-64-floating.png45.19KB18.45KB▼ 59.17%