10% carla

Code Review | Carla Wordpress Security Plugin

WordPress plugin Carla Wordpress Security Plugin scored10%from 54 tests.

About plugin

  • Plugin page: carla
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2017
  • Latest release: Jan 9, 2022
  • Number of updates: 104
  • Update frequency: every 15.1 days
  • Top authors: lavega45 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,970 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/carla/carla.php+28
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.71ms] Passed 4 tests

An overview of server-side resources used by Carla Wordpress Security Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.10 ▼42.80
Dashboard /wp-admin2.05 ▼1.305.30 ▼54.71
Posts /wp-admin/edit.php2.05 ▼1.315.96 ▼43.47
Add New Post /wp-admin/post-new.php2.05 ▼3.844.90 ▼85.84
Media Library /wp-admin/upload.php2.05 ▼1.184.72 ▼30.28
Geolocalisation /wp-admin/admin.php?page=Geolocalisation2.057.61
Cryptage /wp-admin/admin.php?page=Cryptage2.057.20
Carla /wp-admin/admin.php?page=Carla2.056.11
Optimisation /wp-admin/admin.php?page=Optimisation2.057.04
Protection /wp-admin/admin.php?page=Protection2.055.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_ip_log
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Carla Wordpress Security Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.48 ▼0.936.77 ▲5.1643.54 ▼1.47
Dashboard /wp-admin2,269 ▲815.28 ▼0.62110.27 ▲8.9148.63 ▲5.23
Posts /wp-admin/edit.php2,151 ▲622.28 ▲0.2637.36 ▼4.3544.64 ▲9.13
Add New Post /wp-admin/post-new.php1,415 ▼12720.82 ▲2.80565.88 ▼57.3841.18 ▼10.09
Media Library /wp-admin/upload.php1,447 ▲564.57 ▲0.3397.81 ▼2.2747.48 ▲4.53
Geolocalisation /wp-admin/admin.php?page=Geolocalisation9431.8130.9474.44
Cryptage /wp-admin/admin.php?page=Cryptage9591.8226.8651.05
Carla /wp-admin/admin.php?page=Carla1,1032.0326.6447.60
Optimisation /wp-admin/admin.php?page=Optimisation1,0411.8126.1344.15
Protection /wp-admin/admin.php?page=Protection1,0671.8136.4054.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/carla/carla.php+28
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > Deprecated in wp-content/plugins/carla/carla.php+28
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the carla-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the carla-script-font handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the carla-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the carla-style2 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+51
    Undefined index: delete
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+52
    Undefined index: delete_sql
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+65
    Undefined index: asc
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+66
    Undefined index: asc_sql
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+78
    Undefined index: day
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+79
    Undefined index: day_sql
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+92
    Undefined index: desc
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+93
    Undefined index: desc_sql
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+138
    Undefined index: ipinfos
    • > GET request to /wp-admin/admin.php?page=Geolocalisation
    • > Notice in wp-content/plugins/carla/modules/geolocalisation.php+140
    Undefined index: see_details
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+42
    Undefined index: hash_nonce
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+43
    Undefined index: crypter
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+44
    Undefined index: password
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+125
    Undefined index: element
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+126
    Undefined index: password_nonce
    • > GET request to /wp-admin/admin.php?page=Cryptage
    • > Notice in wp-content/plugins/carla/modules/hashage.php+147
    Undefined variable: enregistrement
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > Notice in wp-content/plugins/carla/modules/htaccess.php+8
    Undefined index: htaccess
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Protection
    • > Notice in wp-content/plugins/carla/modules/htaccess.php+286
    Undefined variable: valids
    • > GET request to /wp-admin/admin.php?page=Protection
    • > Notice in wp-content/plugins/carla/modules/htaccess.php+76
    Undefined index: securiser

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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/carla/modules/hashage.php
    • > /wp-content/plugins/carla/modules/htaccess.php
    • > /wp-content/plugins/carla/modules/optimisation.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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Modifier son mot de passe par le backoffice.), #2 (Optimiser et protéger son serveur.), #3 (Géolocalisation d'un visiteur.), #4 (Détails de la géolocalisation.)
The official readme.txt is a good inspiration

carla/carla.php 92% from 13 tests

The main PHP script in "Carla Wordpress Security Plugin" version 1.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,629 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7208811,132
PO File1140148382
CSS228598
JavaScript20517

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.30KB15.33KB▼ 45.82%
img/login_after.png12.86KB7.63KB▼ 40.64%
screenshot-4.png23.67KB10.35KB▼ 56.26%
img/login_before.png17.47KB7.71KB▼ 55.84%
img/wp_version.png1.51KB1.36KB▼ 9.93%