72% la-sentinelle-antispam

Code Review | La Sentinelle antispam

WordPress plugin La Sentinelle antispam scored 72% from 54 tests.

About plugin

  • Plugin page: la-sentinelle-ant...
  • Plugin version: 2.4.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2018
  • Latest release: Aug 7, 2023
  • Number of updates: 159
  • Update frequency: every 11.6 days
  • Top authors: mpol (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active / 23,045 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▲1.50ms] Passed 4 tests

An overview of server-side resources used by La Sentinelle antispam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1235.00 ▼2.02
Dashboard /wp-admin3.47 ▲0.1746.42 ▲3.40
Posts /wp-admin/edit.php3.52 ▲0.1650.20 ▲4.49
Add New Post /wp-admin/post-new.php6.07 ▲0.18105.99 ▲6.93
Media Library /wp-admin/upload.php3.39 ▲0.1632.07 ▲0.14

Server storage [IO: ▲0.18MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 23 new options
New WordPress options
widget_recent-comments
la_sentinelle-sfs
la_sentinelle-remove_comments
la_sentinelle-wpregister
la_sentinelle-save_comments
la_sentinelle-everest
la_sentinelle-noptin
la_sentinelle-nonce
la_sentinelle-honeypot
la_sentinelle-wppassword
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for La Sentinelle antispam
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲24914.10 ▼0.655.75 ▲3.8839.29 ▼6.89
Dashboard /wp-admin2,219 ▲305.12 ▲0.16116.17 ▼2.5946.46 ▲5.04
Posts /wp-admin/edit.php2,102 ▲132.05 ▲0.0438.36 ▼1.4636.30 ▼0.52
Add New Post /wp-admin/post-new.php1,539 ▲2222.83 ▲5.20720.15 ▲93.8351.97 ▼0.71
Media Library /wp-admin/upload.php1,401 ▲104.27 ▲0.1097.90 ▼5.8544.55 ▼0.77
La Sentinelle Log /wp-admin/la-sentinelle-log.php260.440.0818.30
La Sentinelle /wp-admin/la-sentinelle.php260.440.088.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 30× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/la-sentinelle-antispam/admin/lasent-settingspage-formupdate.php
    • > /wp-content/plugins/la-sentinelle-antispam/functions/lasent-settings.php
    • > /wp-content/plugins/la-sentinelle-antispam/spamfilters/lasent-nonce.php
    • > /wp-content/plugins/la-sentinelle-antispam/la-sentinelle-hooks.php
    • > /wp-content/plugins/la-sentinelle-antispam/admin/lasent-settingstab-about.php
    • > /wp-content/plugins/la-sentinelle-antispam/forms/lasent-newsletter-optin-box.php
    • > /wp-content/plugins/la-sentinelle-antispam/forms/lasent-caldera-forms.php
    • > /wp-content/plugins/la-sentinelle-antispam/forms/lasent-wordpress-comment-form.php
    • > /wp-content/plugins/la-sentinelle-antispam/functions/lasent-user-ip.php
    • > /wp-content/plugins/la-sentinelle-antispam/spamfilters/lasent-check-spamfilters.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/la-sentinelle-antispam/forms/caldera-forms/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/la-sentinelle-antispam/la-sentinelle.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function la_sentinelle_get_spamfilters() in wp-content/plugins/la-sentinelle-antispam/forms/caldera-forms/field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/la-sentinelle-antispam/forms/lasent-wpjobmanager.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/la-sentinelle-antispam/forms/caldera-forms/preview.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/la-sentinelle-antispam/spamfilters/lasent-stop-forum-spam.php:200

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/la-sentinelle-log.php
    • > Network (severe)
    wp-admin/la-sentinelle-log.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/la-sentinelle.php
    • > Network (severe)
    wp-admin/la-sentinelle.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 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
6 plugin tags: registration, comments, antispam, stop forum spam, anti-spam...

la-sentinelle-antispam/la-sentinelle.php 85% from 13 tests

The entry point to "La Sentinelle antispam" version 2.4.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("la-sentinelle-antispam.php" instead of "la-sentinelle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,865 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP377748222,774
JavaScript2403673
CSS16518

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions88
▷ Named functions88100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-128x128.png28.46KB9.67KB▼ 66.02%