77% droit-elementor-addons

Code Review | Droit Elementor Addons - Widgets, Blocks, Templates Library For Elementor Builder

WordPress plugin Droit Elementor Addons - Widgets, Blocks, Templates Library For Elementor Builder scored77%from 54 tests.

About plugin

  • Plugin page: droit-elementor-a...
  • Plugin version: 3.1.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Aug 22, 2023
  • Number of updates: 138
  • Update frequency: every 7.3 days
  • Top authors: droitthemes (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

8,000+ active /95,702 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.87ms] Passed 4 tests

A check of server-side resources used by Droit Elementor Addons - Widgets, Blocks, Templates Library For Elementor Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0834.36 ▼3.37
Dashboard /wp-admin3.39 ▲0.0944.43 ▲1.93
Posts /wp-admin/edit.php3.51 ▲0.1544.45 ▼6.71
Add New Post /wp-admin/post-new.php5.97 ▲0.0986.93 ▼10.60
Media Library /wp-admin/upload.php3.32 ▲0.0935.78 ▲1.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Droit Elementor Addons - Widgets, Blocks, Templates Library For Elementor Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.34 ▼0.011.58 ▲0.0142.48 ▲0.72
Dashboard /wp-admin2,219 ▲395.62 ▼0.0388.16 ▼0.3941.75 ▼4.25
Posts /wp-admin/edit.php2,127 ▲242.10 ▲0.1335.98 ▼2.8830.67 ▼4.93
Add New Post /wp-admin/post-new.php1,560 ▲2918.15 ▼4.81616.51 ▲12.26102.78 ▲42.93
Media Library /wp-admin/upload.php1,427 ▲274.22 ▼0.0297.75 ▲0.5444.00 ▲0.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/droit-elementor-addons/modules/templates/views/template-library-search.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/droit-elementor-addons/modules/wpml/wpml_support.php:302
    • > PHP Fatal error
      Uncaught Error: Call to undefined function drdt_core() in wp-content/plugins/droit-elementor-addons/templates/admin/api.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/droit-elementor-addons/functions.php:181
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/droit-elementor-addons/templates/admin/form-data.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/droit-elementor-addons/functions.php:181
    • > PHP Fatal error
      Uncaught Error: Call to undefined function drdt_core() in wp-content/plugins/droit-elementor-addons/modules/templates/views/template-library-header.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function drdt_core() in wp-content/plugins/droit-elementor-addons/templates/admin/reset_tool.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/droit-elementor-addons/templates/admin/dashboard.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function drdt_core() in wp-content/plugins/droit-elementor-addons/templates/admin/pro_page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function drdt_core() in wp-content/plugins/droit-elementor-addons/templates/admin/elements.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

droit-elementor-addons/plugins.php 77% from 13 tests

"Droit Elementor Addons - Widgets, Blocks, Templates Library For Elementor Builder" version 3.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("droit-elementor-addons.php" instead of "plugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin90,368 lines of code in 244 files:
LanguageFilesBlank linesComment linesLines of code
PHP924,45072334,545
CSS654,01813027,098
SVG331210,514
PO File64,87212,21610,435
Sass18507344,782
JavaScript303063702,994

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity15.13
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes68
▷ Abstract classes00.00%
▷ Concrete classes68100.00%
▷ Final classes11.47%
Methods832
▷ Static methods8810.58%
▷ Public methods56768.15%
▷ Protected methods25931.13%
▷ Private methods60.72%
Functions23
▷ Named functions1565.22%
▷ Anonymous functions834.78%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.53MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/d_e_a.png0.57KB0.55KB▼ 4.27%
assets/images/setting_shape.png290.06KB145.74KB▼ 49.76%
assets/images/dashboard_intro_bg.png56.71KB25.20KB▼ 55.57%
assets/images/info_box_shape_1.png0.60KB0.43KB▼ 28.36%
assets/images/play_icon.png0.55KB0.41KB▼ 24.82%