84% nd-elements

Code Review | Elements For Elementor

WordPress plugin Elements For Elementor scored84%from 54 tests.

About plugin

  • Plugin page: nd-elements
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Mar 10, 2020
  • Latest release: Dec 2, 2022
  • Number of updates: 35
  • Update frequency: every 28.5 days
  • Top authors: nicdark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /35,704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼13.65MB] [CPU: ▼2,836,101.13ms] Passed 4 tests

A check of server-side resources used by Elements For Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▼54.6938.87 ▼11,344,389.06
Dashboard /wp-admin3.39 ▲0.0452.75 ▼1.25
Posts /wp-admin/edit.php3.50 ▲0.1049.61 ▼3.61
Add New Post /wp-admin/post-new.php5.97 ▲0.0490.91 ▼9.16
Media Library /wp-admin/upload.php3.31 ▲0.0338.13 ▼2.67

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Elements For Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲2214.34 ▼0.221.80 ▲0.0338.70 ▼2.39
Dashboard /wp-admin2,212 ▲355.62 ▼0.0190.03 ▼6.3240.24 ▼7.65
Posts /wp-admin/edit.php2,120 ▲171.98 ▼0.0335.16 ▼6.2734.44 ▼1.07
Add New Post /wp-admin/post-new.php1,538 ▲1023.04 ▼0.23693.02 ▼16.0762.18 ▼2.24
Media Library /wp-admin/upload.php1,417 ▲264.19 ▲0.0197.51 ▼8.4148.02 ▲0.41

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 67× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/nd-elements/widgets/woogrid/layout/layout-1.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/nd-elements/widgets/woocart/layout/layout-1.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/nd-elements/widgets/postgrid/layout/layout-2.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/nd-elements/widgets/woogrid/layout/layout-4.php:7
    • > PHP Notice
      Undefined variable: the_query in wp-content/plugins/nd-elements/widgets/postgrid/layout/layout-4.php on line 8
    • > PHP Notice
      Undefined variable: list_title in wp-content/plugins/nd-elements/widgets/list/layout/layout-1.php on line 8
    • > PHP Notice
      Undefined variable: the_query in wp-content/plugins/nd-elements/widgets/woogrid/layout/layout-3.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/nd-elements/widgets/postgrid/index.php:5
    • > PHP Notice
      Undefined variable: nd_elements_image_after in wp-content/plugins/nd-elements/widgets/beforeafter/layout/layout-1.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/nd-elements/widgets/postgrid/layout/layout-7.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: shortcodes, framework, prices, team, testimonials...

nd-elements/nd-elements.php Passed 13 tests

The main file in "Elements For Elementor" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
The plugin adds some useful Elementor components that can be integrated very easily on your own theme.

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
No dangerous file extensions were detected4,126 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,1712613,735
CSS110927249
SVG212123
JavaScript210319

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.18
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods68
▷ Static methods11.47%
▷ Public methods4870.59%
▷ Protected methods2029.41%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
widgets/postgrid/layout/img/icon-link.png1.61KB1.91KB0.00%
widgets/woogrid/img/icon-link.png1.61KB1.91KB0.00%
widgets/postgrid/layout/img/comment-icon-grey-2.png1.71KB1.92KB0.00%
widgets/postgrid/layout/img/comment-icon.png1.39KB1.55KB0.00%
widgets/woogrid/img/comment-icon.png1.39KB1.55KB0.00%