77% dethemekit-for-elementor

Code Review | DethemeKit For Elementor

WordPress plugin DethemeKit For Elementor scored77%from 54 tests.

About plugin

  • Plugin page: dethemekit-for-el...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2+
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Apr 25, 2022
  • Number of updates: 48
  • Update frequency: every 12.9 days
  • Top authors: detheme (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

30,000+ active /227,009 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: ▲1.41MB] [CPU: ▲6.20ms] Passed 4 tests

An overview of server-side resources used by DethemeKit For Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.71 ▲1.2447.80 ▲7.96
Dashboard /wp-admin4.76 ▲1.4656.90 ▲4.36
Posts /wp-admin/edit.php4.87 ▲1.5258.23 ▲7.59
Add New Post /wp-admin/post-new.php7.36 ▲1.4799.70 ▲9.92
Media Library /wp-admin/upload.php4.68 ▲1.4542.03 ▲4.90
Version Control /wp-admin/admin.php?page=dethemekit-addons-version4.6638.73
Dethemekit /wp-admin/options-general.php?page=dethemekit-setting-page4.6540.15
System Info /wp-admin/admin.php?page=dethemekit-addons-sys4.7040.61
Google Maps /wp-admin/admin.php?page=dethemekit-addons-maps4.6641.55
Settings /wp-admin/admin.php?page=dethemekit-addons-about4.6539.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for DethemeKit For Elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲23913.62 ▼0.7914.63 ▲12.5836.60 ▼9.48
Dashboard /wp-admin2,254 ▲775.59 ▼0.0191.70 ▼4.3182.33 ▲39.10
Posts /wp-admin/edit.php2,137 ▲372.12 ▲0.1335.39 ▼0.1434.63 ▼0.68
Add New Post /wp-admin/post-new.php1,557 ▲2623.06 ▼0.25606.74 ▼88.3254.91 ▲7.66
Media Library /wp-admin/upload.php1,437 ▲404.32 ▲0.1297.32 ▼19.9743.73 ▼7.12
Version Control /wp-admin/admin.php?page=dethemekit-addons-version9472.5460.5237.22
Dethemekit /wp-admin/options-general.php?page=dethemekit-setting-page8792.1724.1227.77
System Info /wp-admin/admin.php?page=dethemekit-addons-sys9992.5653.7436.88
Google Maps /wp-admin/admin.php?page=dethemekit-addons-maps1,2512.5544.4635.06
Settings /wp-admin/admin.php?page=dethemekit-addons-about9372.5444.0938.39

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

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

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dethemekit-for-elementor/includes/test.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-content.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-filters-item.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-tabs-item.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-tabs.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-filters.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-templates.php
    • > /wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-preview.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-error.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-header-back.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-insert-button.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-loading.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dethemekit-for-elementor/modules/controls/de-global-style.php:144
    • > PHP Warning
      Use of undefined constant DETHEMEKIT_ADDONS_URL - assumed 'DETHEMEKIT_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-header-logo.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dethemekit-for-elementor/admin/settings/dethemekit-settings.php:209
    • > PHP Fatal error
      Uncaught Error: Class 'Detheme_Kit' not found in wp-content/plugins/dethemekit-for-elementor/core.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-header-logo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dethemekit-for-elementor/includes/templates/scripts/template-modal-item.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
You can take inspiration from this readme.txt

dethemekit-for-elementor/detheme-kit.php 85% from 13 tests

The entry point to "DethemeKit For Elementor" version 2.0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 ("dethemekit-for-elementor.php" instead of "detheme-kit.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin90,419 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript745,1472,47330,149
CSS492,96256727,449
PHP1134,7114,21524,076
SVG8004,128
Sass190602,736
PO File18911,2081,881

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 148)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.79
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity148.00
Code structure
Namespaces22
Interfaces0
Traits0
Classes89
▷ Abstract classes66.74%
▷ Concrete classes8393.26%
▷ Final classes22.41%
Methods717
▷ Static methods11115.48%
▷ Public methods56578.80%
▷ Protected methods11716.32%
▷ Private methods354.88%
Functions78
▷ Named functions5975.64%
▷ Anonymous functions1924.36%
Constants22
▷ Global constants1150.00%
▷ Class constants1150.00%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
42 PNG files occupy 0.57MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/frontend/images/prettyPhoto/default/sprite_prev.png1.34KB0.38KB▼ 71.73%
admin/images/dethemekit-addons-logo.png9.84KB4.58KB▼ 53.45%
assets/frontend/images/prettyPhoto1/default/sprite.png6.53KB3.21KB▼ 50.87%
admin/images/dethemekit-blocks-logo.png5.17KB2.48KB▼ 51.99%
assets/frontend/images/prettyPhoto1/default/sprite_prev.png1.34KB0.38KB▼ 71.73%