72% royal-elementor-addons

Code Review | Royal Elementor Addons and Templates

WordPress plugin Royal Elementor Addons and Templates scored72%from 54 tests.

About plugin

  • Plugin page: royal-elementor-a...
  • Plugin version: 1.3.81
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 522
  • Update frequency: every 1.8 days
  • Top authors: wproyal (100%)

Code review

54 tests

User reviews

310 reviews

Install metrics

200,000+ active /2,951,768 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.28MB] [CPU: ▲28.67ms] 75% from 4 tests

A check of server-side resources used by Royal Elementor Addons and Templates
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.28MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.11 ▲5.6564.96 ▲26.45
Dashboard /wp-admin9.13 ▲5.8373.62 ▲18.70
Posts /wp-admin/edit.php9.13 ▲5.7781.36 ▲35.09
Add New Post /wp-admin/post-new.php9.77 ▲3.88120.28 ▲34.42
Media Library /wp-admin/upload.php9.13 ▲5.9077.28 ▲45.74
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.1362.08

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 514 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
fs_debug_mode
fs_active_plugins
fs_accounts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
royal_elementor_addons_activation_time_for_sale
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Royal Elementor Addons and Templates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6914.20 ▼0.151.53 ▼0.1427.66 ▼11.80
Dashboard /wp-admin2,236 ▲595.67 ▼0.0395.61 ▼1.6045.87 ▲0.16
Posts /wp-admin/edit.php2,142 ▲392.15 ▲0.2040.92 ▲1.9637.11 ▼0.06
Add New Post /wp-admin/post-new.php1,551 ▲2523.21 ▼0.43700.35 ▲100.9053.27 ▼0.31
Media Library /wp-admin/upload.php1,435 ▲354.18 ▼0.0196.86 ▼1.0743.71 ▼0.22
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0851.7926.2827.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/royal-elementor-addons/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_debug_mode
    • db_upgraded
    • can_compress_scripts
    • royal_elementor_addons_activation_time
    • widget_theysaidso_widget
    • fs_accounts
    • fs_active_plugins
    • ...

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 63× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/forms/module.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/google-maps/module.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/royal-elementor-addons/admin/metabox/wpr-secondary-image.php:7
    • > PHP Warning
      Use of undefined constant WPR_ADDONS_PATH - assumed 'WPR_ADDONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/royal-elementor-addons/classes/modules/wpr-form-handlers.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/theme-builder/post-media/module.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/royal-elementor-addons/includes/controls/wpr-ajax-select2/wpr-control-ajax-select2-api.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/theme-builder/woocommerce/product-description/module.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/theme-builder/post-content/module.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/media-grid/module.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WprAddons\\Base\\Module_Base' not found in wp-content/plugins/royal-elementor-addons/modules/theme-builder/woocommerce/product-media/module.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in royal-elementor-addons/assets to your readme.txt
The official readme.txt is a good inspiration

royal-elementor-addons/wpr-addons.php 85% from 13 tests

The primary PHP file in "Royal Elementor Addons and Templates" version 1.3.81 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("royal-elementor-addons.php" instead of "wpr-addons.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin218,104 lines of code in 445 files:
LanguageFilesBlank linesComment linesLines of code
PHP34625,53123,209167,139
CSS414,24594026,438
JavaScript535,9453,85023,714
XML2608551
Markdown1680214
SVG10047
JSON1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.59
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces163
Interfaces0
Traits0
Classes263
▷ Abstract classes31.14%
▷ Concrete classes26098.86%
▷ Final classes10.38%
Methods3,468
▷ Static methods2938.45%
▷ Public methods2,85882.41%
▷ Protected methods1935.57%
▷ Private methods41712.02%
Functions199
▷ Named functions17085.43%
▷ Anonymous functions2914.57%
Constants158
▷ Global constants10868.35%
▷ Class constants5031.65%
▷ Public constants50100.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
21 PNG files occupy 1.04MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/lib/gmap/clusters/m5.png6.68KB5.10KB▼ 23.66%
assets/img/placeholder.png6.00KB5.03KB▼ 16.19%
assets/img/logo-128x128.png12.25KB7.07KB▼ 42.33%
assets/img/old-theme-builder.png427.27KB114.54KB▼ 73.19%
assets/img/check-mark.png0.41KB0.30KB▼ 26.65%