84% protection-against-ddos

Code Review | Protection Against DDoS

WordPress plugin Protection Against DDoS scored84%from 54 tests.

About plugin

  • Plugin page: protection-agains...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-5.4
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Apr 29, 2020
  • Number of updates: 36
  • Update frequency: every 38.8 days
  • Top authors: wpchefgadget (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

4,000+ active /45,082 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.46ms] Passed 4 tests

An overview of server-side resources used by Protection Against DDoS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0651.00 ▲9.39
Dashboard /wp-admin3.37 ▲0.0650.25 ▼0.05
Posts /wp-admin/edit.php3.48 ▲0.1245.24 ▼1.47
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.57 ▼13.19
Media Library /wp-admin/upload.php3.29 ▲0.0638.92 ▲4.89
DDoS Protection /wp-admin/options-general.php?page=paddos3.2536.80

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.88KB) outside of "wp-content/plugins/protection-against-ddos/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Protection Against DDoS: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7214.75 ▲0.171.73 ▼0.0945.03 ▼5.22
Dashboard /wp-admin2,213 ▲254.86 ▼1.00110.17 ▼8.0043.05 ▼4.89
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0133.76 ▼4.4035.01 ▼0.14
Add New Post /wp-admin/post-new.php1,542 ▲2223.20 ▼0.11613.48 ▼58.5052.78 ▼0.44
Media Library /wp-admin/upload.php1,392 ▲14.23 ▼0.0195.30 ▼0.7042.55 ▼3.13
DDoS Protection /wp-admin/options-general.php?page=paddos8782.0627.0935.50

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/protection-against-ddos/protection-against-ddos.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: login, ddos, brute force, peformance, security

protection-against-ddos/protection-against-ddos.php Passed 13 tests

The main file in "Protection Against DDoS" v. 1.5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
Protection against DDoS.

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 detected396 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18123396

PHP code Passed 2 tests

A brief analysis 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.42
Average class complexity29.50
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1565.22%
▷ Protected methods730.43%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin