100% basic-security

Code Review | Basic Security: Prevent Cross Site Scripting

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

About plugin

  • Plugin page: basic-security
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.8.1
  • First release: Sep 30, 2021
  • Latest release: Oct 28, 2021
  • Number of updates: 5
  • Update frequency: every 5.6 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 102 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼145.15ms] 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 /2.84 ▲0.1233.60 ▲12.74
Dashboard /wp-admin3.07 ▲0.0146.91 ▼1.01
Posts /wp-admin/edit.php3.12 ▲0.0146.63 ▼0.29
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.88 ▼578.57
Media Library /wp-admin/upload.php3.01 ▲0.0033.77 ▼0.72

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, no new options

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 /3,703 ▲10716.32 ▲0.8310.24 ▲2.0156.06 ▲0.68
Dashboard /wp-admin2,970 ▲395.95 ▲0.01142.82 ▼4.11122.92 ▼4.97
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0072.79 ▲3.42103.66 ▼0.89
Add New Post /wp-admin/post-new.php1,683 ▲10218.74 ▼1.61389.49 ▼16.64117.35 ▼2.28
Media Library /wp-admin/upload.php1,804 ▼34.99 ▼0.02148.01 ▼14.67120.33 ▼3.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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
2 plugin tags: xss, cross site scripting

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

This is the main PHP file of "Basic Security: Prevent Cross Site Scripting" version 0.0.2, 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