10% sea-sp-community-edition

Code Review | SeaSP Community Edition

WordPress plugin SeaSP Community Edition scored 10% from 54 tests.

About plugin

  • Plugin page: sea-sp-community-...
  • Plugin version: 1.8.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Aug 18, 2020
  • Latest release: Jul 19, 2021
  • Number of updates: 24
  • Update frequency: every 14.1 days
  • Top authors: bluetriangle (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,368 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. Unsupported value type (array). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.)

Server metrics [RAM: ▲0.28MB] [CPU: ▲0.92ms] Passed 4 tests

A check of server-side resources used by SeaSP Community Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2845.53 ▲3.81
Dashboard /wp-admin3.59 ▲0.2854.54 ▲2.06
Posts /wp-admin/edit.php3.70 ▲0.3450.82 ▲1.98
Add New Post /wp-admin/post-new.php6.17 ▲0.2888.55 ▼4.17
Media Library /wp-admin/upload.php3.51 ▲0.2841.56 ▲6.07
Help Center /wp-admin/admin.php?page=blue-triangle-free-csp-help-center3.4836.65
Current Violations /wp-admin/admin.php?page=blue-triangle-free-csp-csp-violations3.4946.42
General Settings /wp-admin/admin.php?page=blue-triangle-free-csp-general-settings3.4935.70
Blue Triangle SeaSP /wp-admin/admin.php?page=blue-triangle-free-csp3.5136.58
Directive Settings /wp-admin/admin.php?page=blue-triangle-free-csp-directive-settings4.1245.06
Usage Data Settings /wp-admin/admin.php?page=blue-triangle-free-csp-usage-settings3.4944.17

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 55 new files
Database: 9 new tables, 7 new options
New tables
wp_seasp_violation_log
wp_seasp_site_settings
wp_seasp_directive_options
wp_seasp_csp
wp_seasp_directive_settings
wp_seasp_directives
wp_seasp_sand_box_urls
wp_seasp_allowed_plugins
wp_seasp_subdomain_log
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
Blue_Triangle_Automated_CSP_Free_Directive_Options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for SeaSP Community Edition
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲29413.67 ▼0.706.43 ▲4.7241.84 ▲1.54
Dashboard /wp-admin2,301 ▲1165.81 ▲0.9296.37 ▼14.0739.80 ▼0.36
Posts /wp-admin/edit.php2,187 ▲1012.05 ▲0.0238.00 ▲3.0532.44 ▼0.21
Add New Post /wp-admin/post-new.php1,604 ▲7618.52 ▲0.35590.27 ▼14.3151.76 ▼0.51
Media Library /wp-admin/upload.php1,486 ▲984.23 ▲0.00101.50 ▲2.9446.45 ▲1.03
Help Center /wp-admin/admin.php?page=blue-triangle-free-csp-help-center1,6099.58275.9597.20
Current Violations /wp-admin/admin.php?page=blue-triangle-free-csp-csp-violations1,1832.3027.4565.53
General Settings /wp-admin/admin.php?page=blue-triangle-free-csp-general-settings1,2202.1334.2444.37
Blue Triangle SeaSP /wp-admin/admin.php?page=blue-triangle-free-csp1,3171.9425.5155.30
Directive Settings /wp-admin/admin.php?page=blue-triangle-free-csp-directive-settings7,8652.71473.2896.76
Usage Data Settings /wp-admin/admin.php?page=blue-triangle-free-csp-usage-settings1,0901.9136.7045.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sea-sp-community-edition/Bluetriangle-free-csp.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sea-sp-community-edition/src/views/directives-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/sea-sp-community-edition/src/views/help-view.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sea-sp-community-edition/src/views/violations-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/sea-sp-community-edition/src/views/dashboard-view.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sea-sp-community-edition/src/controllers/Ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sea-sp-community-edition/src/views/usage-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sea-sp-community-edition/src/views/general-view.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: content security policy, security, csp, http headers

sea-sp-community-edition/Bluetriangle-free-csp.php 92% from 13 tests

The main PHP file in "SeaSP Community Edition" ver. 1.8.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sea-sp-community-edition.php" instead of "Bluetriangle-free-csp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected2,871 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP9193982,364
Markdown3660193
JavaScript71618186
CSS33113126
SVG1001
YAML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 2.23MB with 1.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/BT-Webinars.png43.95KB12.35KB▼ 71.89%
img/blog-images/blog-03.png73.93KB22.05KB▼ 70.17%
img/webinar/web-02.png56.07KB16.74KB▼ 70.14%
assets/screenshot-2.png306.40KB71.97KB▼ 76.51%
img/Parrot.png14.13KB4.01KB▼ 71.61%