67% wp-security-coat

Code Review | WP Security Coat

WordPress plugin WP Security Coat scored67%from 54 tests.

About plugin

  • Plugin page: wp-security-coat
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Aug 24, 2017
  • Number of updates: 20
  • Update frequency: every 0.6 days
  • Top authors: leontinashe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /946 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.22MB] [CPU: ▼44.39ms] Passed 4 tests

Server-side resources used by WP Security Coat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7115.50 ▼24.54
Dashboard /wp-admin2.79 ▼0.5117.25 ▼34.74
Posts /wp-admin/edit.php2.79 ▼0.5715.85 ▼42.53
Add New Post /wp-admin/post-new.php2.79 ▼3.1022.84 ▼75.73
Media Library /wp-admin/upload.php2.79 ▼0.4416.12 ▼20.37

Server storage [IO: ▲0.47MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.60KB) outside of "wp-content/plugins/wp-security-coat/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Security Coat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.45 ▼0.908.33 ▲6.5645.49 ▼0.73
Dashboard /wp-admin2,195 ▲185.54 ▼0.1196.09 ▲7.0082.84 ▲42.78
Posts /wp-admin/edit.php2,118 ▲152.05 ▲0.0537.01 ▼2.1832.88 ▼4.91
Add New Post /wp-admin/post-new.php1,549 ▲2318.27 ▼5.35645.46 ▼63.6461.05 ▼3.05
Media Library /wp-admin/upload.php1,418 ▲184.27 ▲0.0497.49 ▼12.0174.38 ▲27.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-security-coat/admin/class-wp-seccoat-admin.php+80
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-security-coat/public/partials/wp-seccoat-public-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-security-coat/admin/partials/wp-secoat-admin-security-server.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-security-coat/admin/partials/wp-secoat-admin-security-wordpress.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-security-coat/admin/partials/wp-secoat-admin-security-php-mysql.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-security-coat/includes/class-wp-seccoat-deactivator.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-security-coat/admin/partials/wp-seccoat-admin-display.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in wp-security-coat/assets to your readme.txt
You can take inspiration from this readme.txt

wp-security-coat/wp-seccoat.php 77% from 13 tests

The entry point to "WP Security Coat" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 259 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-security-coat.php" instead of "wp-seccoat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected959 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16573477900
JavaScript211537
CSS221722

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.38
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1124.44%
▷ Public methods4088.89%
▷ Protected methods00.00%
▷ Private methods511.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/wpsecurityco.png5.42KB1.17KB▼ 78.36%
admin/images/scpages1.png147.47KB16.16KB▼ 89.04%
(invalid) admin/images/wpsecuritycoatlg.png0.00KB0.00KB0.00%
admin/images/wpsecuritycoat.png91.30KB8.02KB▼ 91.21%
admin/images/wpsecuritycoa.png7.43KB1.64KB▼ 77.88%