84% insecure-content-warning

Code Review | Insecure Content Warning

WordPress plugin Insecure Content Warning scored84%from 54 tests.

About plugin

  • Plugin page: insecure-content-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 13, 2019
  • Latest release: Oct 16, 2023
  • Number of updates: 9
  • Update frequency: every 212.9 days
  • Top authors: 10up (66.67%)helen (33.33%)10upbot (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,702 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.16ms] Passed 4 tests

Server-side resources used by Insecure Content Warning
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.70 ▲1.69
Dashboard /wp-admin3.43 ▲0.1247.56 ▼2.81
Posts /wp-admin/edit.php3.54 ▲0.1843.79 ▼4.78
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.78 ▼10.74
Media Library /wp-admin/upload.php3.35 ▲0.1235.05 ▲4.11
Insecure Content Warning /wp-admin/tools.php?page=insecure-content-warning3.3332.00

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Insecure Content Warning
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.381.87 ▼0.0147.76 ▲3.52
Dashboard /wp-admin2,202 ▲255.61 ▼0.0481.12 ▼23.7438.75 ▼6.24
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0236.09 ▼0.2334.21 ▼1.14
Add New Post /wp-admin/post-new.php1,540 ▲1423.11 ▲0.02687.06 ▲81.1557.64 ▲9.11
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0295.89 ▼6.4541.17 ▼2.13
Insecure Content Warning /wp-admin/tools.php?page=insecure-content-warning9611.7323.7526.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/insecure-content-warning/includes/wp-cli/insecure-content-warning.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ICW\\plugin_dir_url() in wp-content/plugins/insecure-content-warning/insecure-content-warning.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: ssl, https, publishing, secure content, publishers

insecure-content-warning/insecure-content-warning.php Passed 13 tests

The main PHP script in "Insecure Content Warning" version 1.2.0 is automatically included on every request by WordPress
59 characters long description:
Prevent editors from adding insecure content in the editor.

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
Success! There were no dangerous files found in this plugin658 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10119381650
JavaScript3036
CSS2002

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.38
Average class complexity23.50
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods562.50%
▷ Protected methods337.50%
▷ Private methods00.00%
Functions39
▷ Named functions1846.15%
▷ Anonymous functions2153.85%
Constants5
▷ Global constants5100.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
No PNG files were detected