78% ht-mega-for-elementor

Code Review | HT Mega - Absolute Addons for Elementor Page Builder

WordPress plugin HT Mega - Absolute Addons for Elementor Page Builder scored 78% from 54 tests.

About plugin

  • Plugin page: ht-mega-for-eleme...
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 5.9.2
  • First release: Nov 22, 2018
  • Latest release: Apr 5, 2022
  • Number of updates: 106
  • Update frequency: every 11.6 days
  • Top authors: devitemsllc (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

90,000+ active / 1,470,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by HT Mega - Absolute Addons for Elementor Page Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0568.58 ▲6.00
Dashboard /wp-admin3.45 ▲0.0539.19 ▼3.15
Posts /wp-admin/edit.php3.68 ▲0.0547.42 ▼1.44
Add New Post /wp-admin/post-new.php6.92 ▼0.05107.40 ▼1,169.06
Media Library /wp-admin/upload.php3.34 ▲0.0439.30 ▲4.40

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 304 new files
Database: no new tables, 1 new option
New WordPress options
htmega_do_activation_redirect

Browser metrics Passed 4 tests

Checking browser requirements for HT Mega - Absolute Addons for Elementor Page Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲7916.19 ▲0.798.20 ▲0.312.52 ▼0.27
Dashboard /wp-admin2,933 ▲496.41 ▼0.22154.77 ▼13.14185.53 ▼5.75
Posts /wp-admin/edit.php2,698 ▲73.43 ▼0.0074.23 ▼0.36163.06 ▼17.97
Add New Post /wp-admin/post-new.php1,649 ▼620.53 ▼0.13574.52 ▼4.82216.83 ▲16.72
Media Library /wp-admin/upload.php1,707 ▲155.69 ▲0.00169.20 ▼3.14229.59 ▼6.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • htmega_do_activation_redirect

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ht-mega-for-elementor/admin/include/templates/library/templates.php
    • > /wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-4.php
  • 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Icons_Manager' not found in wp-content/plugins/ht-mega-for-elementor/includes/class.htmega-icon-manager.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ht-mega-for-elementor/extensions/ht-menu/classes/class.mega-menu.php:15
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-4.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-2.php:4
    • > PHP Notice
      Undefined variable: weather in wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-4.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-4.php on line 2
    • > PHP Warning
      Use of undefined constant HTMEGA_ADDONS_PL_PATH - assumed 'HTMEGA_ADDONS_PL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ht-mega-for-elementor/extensions/ht-builder/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ht-mega-for-elementor/includes/helper-function.php:341
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ht-mega-for-elementor/includes/widgets/weather/template/layout-4.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/ht-mega-for-elementor/index.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: elementor blocks, elementor page builder, elementor addons, elementor, elementor widgets

ht-mega-for-elementor/htmega_addons_elementor.php 85% from 13 tests

"HT Mega - Absolute Addons for Elementor Page Builder" version 1.8.4'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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ht-mega-for-elementor.php" instead of "htmega_addons_elementor.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin146,730 lines of code in 248 files:
LanguageFilesBlank linesComment linesLines of code
PHP15010,5032,39886,644
CSS447,18583338,973
SVG911214,663
JavaScript456155156,450

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 187)
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.56
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity187.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes141
▷ Abstract classes21.42%
▷ Concrete classes13998.58%
▷ Final classes10.72%
Methods1,116
▷ Static methods393.49%
▷ Public methods87378.23%
▷ Protected methods21419.18%
▷ Private methods292.60%
Functions36
▷ Named functions3391.67%
▷ Anonymous functions38.33%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
14 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bg/servicebg.png67.93KB41.13KB▼ 39.45%
assets/images/castle.png1.58KB0.89KB▼ 43.57%
admin/assets/images/icon/rating.png3.91KB1.85KB▼ 52.56%
assets/images/pricing/pricebg1.png14.34KB9.43KB▼ 34.25%
assets/images/house.png0.59KB0.53KB▼ 10.89%