90% basic-security

Code Review | Basic Security: Prevent Cross Site Scripting

WordPress plugin Basic Security: Prevent Cross Site Scripting scored90%from 54 tests.

About plugin

  • Plugin page: basic-security
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 30, 2021
  • Latest release: Nov 1, 2023
  • Number of updates: 14
  • Update frequency: every 54.4 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Basic Security: Prevent Cross Site Scripting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.92 ▼0.58
Dashboard /wp-admin3.31 ▼0.0446.66 ▼18.25
Posts /wp-admin/edit.php3.36 ▲0.0044.41 ▼4.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.60 ▼6.36
Media Library /wp-admin/upload.php3.23 ▲0.0042.31 ▲6.95

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Basic Security: Prevent Cross Site Scripting
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.34 ▼0.031.76 ▼0.1842.49 ▼7.05
Dashboard /wp-admin2,195 ▲175.62 ▼0.0291.16 ▼22.7337.99 ▼4.76
Posts /wp-admin/edit.php2,103 ▲61.97 ▲0.0138.94 ▲0.9638.21 ▲0.26
Add New Post /wp-admin/post-new.php1,526 ▼523.21 ▲0.15683.91 ▼23.4957.73 ▲5.65
Media Library /wp-admin/upload.php1,397 ▼34.28 ▲0.03100.28 ▲1.4446.00 ▲3.51

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

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 no errors were found, this is by no means an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: security, cross site scripting, xss, protection, vulnerabilities

basic-security/basic-security.php Passed 13 tests

This is the main PHP file of "Basic Security: Prevent Cross Site Scripting" version 0.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Ultra lightweight plugin to prevent Cross Site Scripting (XSS).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin17 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP231717

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code1.20
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin