84% mega-elements-addons-for-elementor

Code Review | Mega Elements - Addons for Elementor

WordPress plugin Mega Elements - Addons for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: mega-elements-add...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2021
  • Latest release: Jun 23, 2023
  • Number of updates: 24
  • Update frequency: every 37.3 days
  • Top authors: kraftplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /88,809 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼1.78ms] Passed 4 tests

Analyzing server-side resources used by Mega Elements - Addons for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3850.18 ▲2.45
Dashboard /wp-admin3.76 ▲0.4653.35 ▼0.24
Posts /wp-admin/edit.php3.82 ▲0.4761.12 ▲11.86
Add New Post /wp-admin/post-new.php6.27 ▲0.3892.51 ▼12.06
Media Library /wp-admin/upload.php3.61 ▲0.3839.04 ▲2.73

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 113 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Mega Elements - Addons for Elementor: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,019 ▲25814.39 ▼0.221.61 ▼0.1539.98 ▼5.93
Dashboard /wp-admin2,425 ▲2486.22 ▲0.69114.39 ▲8.3442.04 ▼0.73
Posts /wp-admin/edit.php2,357 ▲2603.56 ▲1.5452.63 ▲14.1828.91 ▼5.06
Add New Post /wp-admin/post-new.php1,719 ▲19122.27 ▼0.86624.39 ▼46.3436.92 ▼17.30
Media Library /wp-admin/upload.php1,488 ▲884.19 ▼0.0483.23 ▼23.1044.67 ▲1.63
Widgets /wp-admin/admin.php?page=mega-elements#mega-elements-widgets1,9013.2844.8794.16
General /wp-admin/admin.php?page=mega-elements#mega-elements-general1,8323.4147.6775.35

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
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant MEGA_ELEMENTS_ADDONS_FOR_ELEMENTOR_URL - assumed 'MEGA_ELEMENTS_ADDONS_FOR_ELEMENTOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mega-elements-addons-for-elementor/templates/admin/dashboard-general.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mega-elements-addons-for-elementor/templates/admin/dashboard-general.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mega-elements-addons-for-elementor/includes/meafe-helpers.php:302
    • > PHP Fatal error
      Uncaught Error: Class 'MegaElementsAddonsForElementor\\Widgets_Manager' not found in wp-content/plugins/mega-elements-addons-for-elementor/templates/admin/dashboard-widgets.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 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
5 plugin tags: elementor addons, mega elements, elementor widgets, elementor, elements

mega-elements-addons-for-elementor/mega-elements-addons-for-elementor.php 92% from 13 tests

Analyzing the main PHP file in "Mega Elements - Addons for Elementor" version 1.1.9
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin44,654 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP433,4981,18429,053
CSS351,6631929,755
JavaScript17177973,921
Sass3383121,891
SVG10034

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.25
Average class complexity27.81
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods395
▷ Static methods297.34%
▷ Public methods26266.33%
▷ Protected methods13032.91%
▷ Private methods30.76%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
assets/admin/dashboard/images/doc-img.png27.38KB8.71KB▼ 68.17%