84% trust-txt

Code Review | Trust.txt Manager

WordPress plugin Trust.txt Manager scored 84% from 54 tests.

About plugin

  • Plugin page: trust-txt
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 10, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 10
  • Update frequency: every 111.2 days
  • Top authors: pavanpatil1 (40%)rtcamp (40%)mangeshp (20%)juhise (20%)vaishu.agola27 (20%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,300 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.52ms] Passed 4 tests

A check of server-side resources used by Trust.txt Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.97 ▲2.45
Dashboard /wp-admin3.42 ▲0.1245.77 ▼2.23
Posts /wp-admin/edit.php3.47 ▲0.1148.74 ▲0.68
Add New Post /wp-admin/post-new.php6.00 ▲0.1195.55 ▼2.25
Media Library /wp-admin/upload.php3.34 ▲0.1137.46 ▲1.74
Trust.txt /wp-admin/options-general.php?page=trusttxt-settings3.3444.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
trusttxt_post
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Trust.txt Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.144.72 ▲2.9642.54 ▼7.35
Dashboard /wp-admin2,210 ▲225.90 ▲0.04106.63 ▲4.8641.17 ▼0.20
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0038.59 ▲1.5435.09 ▲2.72
Add New Post /wp-admin/post-new.php1,536 ▲1523.13 ▼0.08590.77 ▼94.3747.05 ▼6.86
Media Library /wp-admin/upload.php1,389 ▲14.21 ▲0.06101.34 ▼9.0441.29 ▼5.00
Trust.txt /wp-admin/options-general.php?page=trusttxt-settings9783.4372.0635.79

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • trusttxt_post
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Trusttxt\\add_action() in wp-content/plugins/trust-txt/inc/save.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Trusttxt\\add_action() in wp-content/plugins/trust-txt/inc/post-type.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TrustTxt\\add_action() in wp-content/plugins/trust-txt/inc/admin.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
1 plugin tags: trusttxt

trust-txt/trust-txt.php Passed 13 tests

The primary PHP file in "Trust.txt Manager" version 1.2 is used by WordPress to initiate all plugin functionality
139 characters long description:
Create, manage, and validate your Trust.txt from within WordPress, just like any other content asset. Requires PHP 5.3+ and WordPress 4.9+.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin564 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4102184497
JavaScript115364
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin