10% lead-generator-by-enchantier

Code Review | Générateur de leads - EnChantier

WordPress plugin Générateur de leads - EnChantier scored10%from 54 tests.

About plugin

  • Plugin page: lead-generator-by...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2016
  • Latest release: Aug 30, 2018
  • Number of updates: 37
  • Update frequency: every 47.5 days
  • Top authors: homer8173 (75.68%)tdevlaeminck (27.03%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,262 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/lead-generator-by-enchantier/includes/PHP_Markdown_1.0.1o/markdown.php+193
    Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▲2.51ms] Passed 4 tests

Analyzing server-side resources used by Générateur de leads - EnChantier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.07 ▲3.42
Dashboard /wp-admin3.33 ▲0.0244.75 ▲0.69
Posts /wp-admin/edit.php3.44 ▲0.0848.59 ▲2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.46 ▲3.85
Media Library /wp-admin/upload.php3.25 ▲0.0236.90 ▲4.84
S'inscrire /wp-admin/admin.php?page=EnChantier3.2431.80
Lisez moi /wp-admin/admin.php?page=readme_EnChantier3.2242.79
FAQ /wp-admin/admin.php?page=faq_EnChantier3.2230.25
Contact EnChantier /wp-admin/admin.php?page=about_EnChantier3.2233.54
CGU /wp-admin/admin.php?page=CGU_EnChantier3.2828.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Générateur de leads - EnChantier: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11113.20 ▼1.171.67 ▲0.1443.64 ▲2.70
Dashboard /wp-admin2,260 ▲755.83 ▼0.0198.44 ▼1.7941.30 ▼0.57
Posts /wp-admin/edit.php2,143 ▲542.04 ▲0.0434.31 ▼2.5236.71 ▲1.20
Add New Post /wp-admin/post-new.php1,583 ▲5522.97 ▲4.57669.46 ▲58.5265.38 ▲11.65
Media Library /wp-admin/upload.php1,442 ▲544.16 ▼0.01101.50 ▼3.4647.24 ▲2.03
S'inscrire /wp-admin/admin.php?page=EnChantier8931.7125.3035.45
Lisez moi /wp-admin/admin.php?page=readme_EnChantier8632.0624.4828.79
FAQ /wp-admin/admin.php?page=faq_EnChantier9072.0222.8135.56
Contact EnChantier /wp-admin/admin.php?page=about_EnChantier8302.0225.3827.71
CGU /wp-admin/admin.php?page=CGU_EnChantier1,0802.0221.5224.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lead-generator-by-enchantier/includes/init.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lead-generator-by-enchantier/includes/widget.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lead-generator-by-enchantier/includes/init.php on line 10
    • > PHP Warning
      require(CD_PLUGIN_PATHincludes/api.client.inc.php): failed to open stream: No such file or directory in wp-content/plugins/lead-generator-by-enchantier/includes/key_form.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lead-generator-by-enchantier/includes/register_form.php:13
    • > PHP Warning
      include_once(ABSPATH/wp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/lead-generator-by-enchantier/includes/init.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/lead-generator-by-enchantier/includes/setup_form.php:24
    • > PHP Warning
      Use of undefined constant CD_PLUGIN_PATH - assumed 'CD_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lead-generator-by-enchantier/includes/key_form.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lead-generator-by-enchantier/lead_generator_enchantier.php:12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATH/wp-admin/includes/file.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/lead-generator-by-enchantier/includes/init.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === lead-generator-by-enchantier === )
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

lead-generator-by-enchantier/lead_generator_enchantier.php 92% from 13 tests

The principal PHP file in "Générateur de leads - EnChantier" v. 1.1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lead-generator-by-enchantier.php" instead of "lead_generator_enchantier.php")

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
Success! There were no dangerous files found in this plugin2,385 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP123285291,567
JSON100652
Markdown41130157
XML1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity16.17
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods86
▷ Static methods00.00%
▷ Public methods8295.35%
▷ Protected methods00.00%
▷ Private methods44.65%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.84MB with 0.57MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/image002.png3.61KB2.20KB▼ 39.08%
img/5.exemple-widget-marque-blanche.png63.02KB19.56KB▼ 68.96%
img/4.exemple-widget-partenaire.png791.81KB28.66KB▼ 96.38%