Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.08MB] [CPU: ▼3.01ms] Passed 4 tests
Analyzing server-side resources used by CrowdSec
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.36 ▲0.89 | 41.28 ▲0.29 |
Dashboard /wp-admin | 4.46 ▲1.11 | 49.60 ▼13.65 |
Posts /wp-admin/edit.php | 4.58 ▲1.22 | 55.03 ▲6.08 |
Add New Post /wp-admin/post-new.php | 7.07 ▲1.18 | 85.51 ▼4.75 |
Media Library /wp-admin/upload.php | 4.39 ▲1.15 | 41.54 ▲8.37 |
Theme customization /wp-admin/admin.php?page=crowdsec_theme_settings | 4.35 | 37.24 |
Advanced /wp-admin/admin.php?page=crowdsec_advanced_settings | 4.36 | 36.67 |
CrowdSec /wp-admin/admin.php?page=crowdsec_plugin | 4.37 | 35.78 |
Server storage [IO: ▲5.83MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 969 new files
Database: no new tables, 60 new options
New WordPress options |
---|
crowdsec_geolocation_cache_duration |
crowdsec_theme_text_ban_wall_subtitle |
crowdsec_theme_text_captcha_wall_footer |
crowdsec_theme_color_background_button |
crowdsec_theme_color_background_page |
crowdsec_geolocation_maxmind_database_path |
crowdsec_theme_text_captcha_wall_error_message |
crowdsec_hide_mentions |
crowdsec_theme_color_text_primary |
crowdsec_fallback_remediation |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for CrowdSec
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲63 | 14.67 ▲0.32 | 1.75 ▲0.10 | 43.58 ▼0.88 |
Dashboard /wp-admin | 2,233 ▲53 | 5.63 ▲0.04 | 90.86 ▼7.65 | 43.00 ▼0.08 |
Posts /wp-admin/edit.php | 2,132 ▲32 | 2.11 ▲0.15 | 37.51 ▼4.18 | 32.52 ▼7.97 |
Add New Post /wp-admin/post-new.php | 1,555 ▲29 | 23.42 ▲0.70 | 655.79 ▲5.40 | 53.96 ▼1.76 |
Media Library /wp-admin/upload.php | 1,435 ▲35 | 4.20 ▲0.01 | 95.54 ▼0.71 | 42.66 ▲1.88 |
Theme customization /wp-admin/admin.php?page=crowdsec_theme_settings | 1,133 | 2.00 | 26.31 | 39.50 |
Advanced /wp-admin/admin.php?page=crowdsec_advanced_settings | 1,390 | 1.70 | 30.51 | 56.79 |
CrowdSec /wp-admin/admin.php?page=crowdsec_plugin | 1,129 | 2.20 | 25.44 | 35.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- 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)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/crowdsec/vendor/gregwar/captcha/demo/index.php
- 557× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\HttpException' not found in wp-content/plugins/crowdsec/vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php:10
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Filesystem\\Exception\\IOException' not found in wp-content/plugins/crowdsec/vendor/symfony/filesystem/Exception/FileNotFoundException.php:20
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/crowdsec/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php:34
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/crowdsec/vendor/gregwar/captcha/demo/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/crowdsec/vendor/gregwar/captcha/demo/ocr.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/crowdsec/vendor/twig/twig/src/Node/SandboxNode.php:21
- > PHP Fatal error
Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/crowdsec/vendor/twig/twig/src/Node/WithNode.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Cache\\InvalidArgumentException' not found in wp-content/plugins/crowdsec/vendor/symfony/cache/Exception/InvalidArgumentException.php:22
- > PHP Fatal error
Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/crowdsec/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php:17
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/crowdsec/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php:19
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/crowdsec/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:24
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
- Tags: Please delete some tags, you are using 20 tag instead of maximum 10
crowdsec/crowdsec.php 92% from 13 tests
The entry point to "CrowdSec" version 2.5.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin71,573 lines of code in 884 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 785 | 12,140 | 25,391 | 61,255 |
Markdown | 59 | 2,601 | 0 | 5,554 |
JSON | 1 | 0 | 0 | 2,315 |
YAML | 15 | 181 | 42 | 1,092 |
C | 1 | 118 | 25 | 668 |
XML | 10 | 13 | 11 | 339 |
Twig | 6 | 19 | 0 | 187 |
CSS | 2 | 16 | 1 | 96 |
m4 | 1 | 8 | 0 | 32 |
Bourne Again Shell | 1 | 4 | 2 | 16 |
reStructuredText | 1 | 8 | 5 | 10 |
C/C++ Header | 1 | 4 | 12 | 8 |
JavaScript | 1 | 0 | 1 | 1 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 10.30 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 181.00 |
Average method complexity | 2.86 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 54.00 |
Code structure | ||
---|---|---|
Namespaces | 128 | |
Interfaces | 69 | |
Traits | 14 | |
Classes | 636 | |
▷ Abstract classes | 48 | 7.55% |
▷ Concrete classes | 588 | 92.45% |
▷ Final classes | 103 | 17.52% |
Methods | 3,470 | |
▷ Static methods | 333 | 9.60% |
▷ Public methods | 2,596 | 74.81% |
▷ Protected methods | 434 | 12.51% |
▷ Private methods | 440 | 12.68% |
Functions | 491 | |
▷ Named functions | 222 | 45.21% |
▷ Anonymous functions | 269 | 54.79% |
Constants | 455 | |
▷ Global constants | 40 | 8.79% |
▷ Class constants | 415 | 91.21% |
▷ Public constants | 333 | 80.24% |
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
8 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/crowdsec/common/docs/images/logo_crowdsec.png | 7.55KB | 3.44KB | ▼ 54.43% |
.wordpress-org/icon-128x128.png | 12.32KB | 4.69KB | ▼ 61.95% |
vendor/crowdsec/capi-client/docs/images/logo_crowdsec.png | 7.55KB | 3.44KB | ▼ 54.43% |
vendor/crowdsec/remediation-engine/docs/images/logo_crowdsec.png | 7.55KB | 3.44KB | ▼ 54.43% |
.wordpress-org/banner-772x250.png | 52.51KB | 19.30KB | ▼ 63.24% |