84% security-protection

Code Review | Security-Protection

WordPress plugin Security-Protection scored84%from 54 tests.

About plugin

  • Plugin page: security-protection
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2014
  • Latest release: Sep 5, 2020
  • Number of updates: 14
  • Update frequency: every 170.2 days
  • Top authors: webvitaly (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

700+ active /14,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.30ms] Passed 4 tests

Server-side resources used by Security-Protection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.52 ▲2.11
Dashboard /wp-admin3.35 ▲0.0445.45 ▼4.30
Posts /wp-admin/edit.php3.40 ▲0.0447.41 ▲4.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.97 ▲1.31
Media Library /wp-admin/upload.php3.27 ▲0.0433.35 ▲2.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Security-Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.19 ▼1.221.82 ▲0.2942.16 ▲2.68
Dashboard /wp-admin2,206 ▲245.80 ▼0.1094.41 ▼20.5037.33 ▼7.75
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0643.29 ▲6.4635.41 ▼0.52
Add New Post /wp-admin/post-new.php1,542 ▲2318.26 ▼4.82633.30 ▼14.6148.94 ▼7.56
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0198.36 ▲0.6242.71 ▲2.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/security-protection/security-protection.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

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

"Security-Protection" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
Protection from login, registration and reset-password brute-force attacks. No captcha.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin195 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14121184
JavaScript16411

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin