79% security-txt

Code Review | Security-TXT

WordPress plugin Security-TXT scored 79% from 54 tests.

About plugin

  • Plugin page: security-txt
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2023
  • Latest release: Jun 15, 2023
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: tstokes8040 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 300 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.79ms] Passed 4 tests

A check of server-side resources used by Security-TXT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.64 ▼1.89
Dashboard /wp-admin3.32 ▲0.0244.12 ▼8.01
Posts /wp-admin/edit.php3.37 ▲0.0247.42 ▲0.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.49 ▼17.65
Media Library /wp-admin/upload.php3.25 ▲0.0234.74 ▲3.09
Security TXT /wp-admin/tools.php?page=security-txt3.2131.68

Server storage [IO: ▲1.26MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/security-txt/" and "wp-content/uploads/"
    • (new file) security.txt
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Security-TXT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.031.66 ▼0.1642.66 ▼2.02
Dashboard /wp-admin2,213 ▲254.83 ▼0.07110.59 ▲10.2740.86 ▼2.74
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0539.49 ▲0.6635.03 ▲0.47
Add New Post /wp-admin/post-new.php1,531 ▼1118.02 ▼0.24626.81 ▲22.1849.91 ▼15.50
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.03102.00 ▲4.7843.74 ▼1.07
Security TXT /wp-admin/tools.php?page=security-txt7882.1925.4326.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/security-txt/security-txt.php+65
    unlink(security.txt): No such file or directory
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

security-txt/security-txt.php 92% from 13 tests

This is the main PHP file of "Security-TXT" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin28,299 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON20028,213
PHP2143668
Markdown19017
Sass1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin