84% mentions-legales-par-webdeclic

Code Review | Mentions Legales Par Webdeclic

WordPress plugin Mentions Legales Par Webdeclic scored84%from 54 tests.

About plugin

  • Plugin page: mentions-legales-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2022
  • Latest release: Jul 11, 2023
  • Number of updates: 9
  • Update frequency: every 29.9 days
  • Top authors: ludwigyou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Mentions Legales Par Webdeclic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.08 ▼3.08
Dashboard /wp-admin3.37 ▲0.0244.09 ▼9.43
Posts /wp-admin/edit.php3.42 ▲0.0643.07 ▼6.62
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.86 ▼29.83
Media Library /wp-admin/upload.php3.29 ▲0.0636.46 ▲2.56

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Mentions Legales Par Webdeclic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.76 ▲0.191.71 ▲0.1243.89 ▲3.66
Dashboard /wp-admin2,211 ▲315.63 ▼0.0683.73 ▼1.8939.30 ▼0.56
Posts /wp-admin/edit.php2,113 ▲131.97 ▼0.0133.67 ▼4.5934.00 ▼4.49
Add New Post /wp-admin/post-new.php1,539 ▲1323.19 ▼0.38668.48 ▲10.9959.32 ▲9.82
Media Library /wp-admin/upload.php1,413 ▲104.16 ▼0.06106.65 ▲8.0644.14 ▲0.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mentions-legales-par-webdeclic/public/templates/shortcode-mentions-legales.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: gdpr, rgpd, mentions legales, site internet, legales...

mentions-legales-par-webdeclic/mentions-legales-par-webdeclic.php Passed 13 tests

The primary PHP file in "Mentions Legales Par Webdeclic" version 1.0.3 is used by WordPress to initiate all plugin functionality
133 characters long description:
Ce plugin permet de générer des mentions légales et de les afficher facilement via un shortcode en front ([wbd_mentions_legales]).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,342 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP223159241,248
CSS19154
JavaScript18124
JSON20015
Markdown1001

PHP code Passed 2 tests

Analyzing 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.39
Average class complexity14.36
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods76
▷ Static methods2026.32%
▷ Public methods6990.79%
▷ Protected methods00.00%
▷ Private methods79.21%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants5
▷ Global constants5100.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 files were detected