83% sentinel-headers-unlimited-extension

Code Review | Sentinel Headers Unlimited Extension

WordPress plugin Sentinel Headers Unlimited Extension scored83%from 54 tests.

About plugin

  • Plugin page: sentinel-headers-...
  • Plugin version: 0.0.03
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Sep 13, 2022
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: unicorn03 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /835 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼11.73ms] Passed 4 tests

An overview of server-side resources used by Sentinel Headers Unlimited Extension
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.09 ▼3.33
Dashboard /wp-admin3.48 ▲0.1446.99 ▼16.19
Posts /wp-admin/edit.php3.53 ▲0.1748.83 ▲3.57
Add New Post /wp-admin/post-new.php6.05 ▲0.1783.45 ▼28.03
Media Library /wp-admin/upload.php3.40 ▲0.1734.21 ▲0.62
Sentinel Headers Unlimited Extension /wp-admin/options-general.php?page=enhanced-csp-and-hsts-security-headers-sentinel-setting-url3.3735.85

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Sentinel Headers Unlimited Extension: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲23414.78 ▲0.521.61 ▼0.1135.30 ▼9.79
Dashboard /wp-admin2,390 ▲2195.78 ▲0.2582.31 ▼10.3954.88 ▲15.82
Posts /wp-admin/edit.php2,189 ▲862.03 ▲0.0434.13 ▼9.6236.09 ▼3.61
Add New Post /wp-admin/post-new.php1,544 ▲1623.50 ▲0.27650.62 ▲41.3559.82 ▲8.84
Media Library /wp-admin/upload.php1,489 ▲894.25 ▲0.0396.32 ▲4.6640.44 ▲1.23
Sentinel Headers Unlimited Extension /wp-admin/options-general.php?page=enhanced-csp-and-hsts-security-headers-sentinel-setting-url1,7601.8527.41107.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sentinel-headers-unlimited-extension/sentinel-headers-unlimited-extension.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sentinel-headers-unlimited-extension === )
  • Screenshots: These screenshots do not have images: #10 (Content Security Policy (CSP) (BEFORE)), #11 (Site-wide security setting)
The official readme.txt might help

sentinel-headers-unlimited-extension/sentinel-headers-unlimited-extension.php 92% from 13 tests

"Sentinel Headers Unlimited Extension" version 0.0.03's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 639 characters long)

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
Good job! No executable or dangerous file extensions detected500 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22944398
PO File1111553
CSS21149

PHP code Passed 2 tests

A short review of 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.22
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon3.png1.79KB1.23KB▼ 31.25%
assets/icon-256x256.png114.49KB53.87KB▼ 52.95%
assets/images/icon2.png16.07KB7.22KB▼ 55.06%