84% shortcode-elementor

Code Review | Shortcodes for Elementor

WordPress plugin Shortcodes for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-elementor
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2019
  • Latest release: Jul 28, 2021
  • Number of updates: 13
  • Update frequency: every 48.9 days
  • Top authors: rstheme2017 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /17,511 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.98ms] Passed 4 tests

Analyzing server-side resources used by Shortcodes for Elementor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.96 ▼3.79
Dashboard /wp-admin3.35 ▲0.0050.45 ▼12.53
Posts /wp-admin/edit.php3.40 ▲0.0455.64 ▲4.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.48 ▼15.84
Media Library /wp-admin/upload.php3.27 ▲0.0440.21 ▲6.21
All Shorcodes /wp-admin/edit.php?post_type=rs_elements3.3137.47
Add New Shorcode /wp-admin/post-new.php?post_type=rs_elements3.3951.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Shortcodes for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.59 ▼0.601.75 ▲0.0440.94 ▼0.93
Dashboard /wp-admin2,250 ▲475.87 ▲0.9797.86 ▼5.0875.61 ▲30.07
Posts /wp-admin/edit.php2,123 ▲262.05 ▲0.0439.54 ▲3.5338.19 ▼0.98
Add New Post /wp-admin/post-new.php1,554 ▲2823.07 ▲5.47714.42 ▲36.1447.91 ▼5.25
Media Library /wp-admin/upload.php1,420 ▲204.27 ▲0.0599.22 ▼2.0586.83 ▲40.95
All Shorcodes /wp-admin/edit.php?post_type=rs_elements1,0951.9537.4533.75
Add New Shorcode /wp-admin/post-new.php?post_type=rs_elements2,2627.60179.86131.02

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-elementor/includes/post-type.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/shortcode-elementor/elementor-shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_shortcode() in wp-content/plugins/shortcode-elementor/includes/settings.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: elementor addon, elements, elementor, rsaddon, essential widget...

shortcode-elementor/elementor-shortcode.php 85% from 13 tests

"Shortcodes for Elementor" version 1.0.2'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 must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("shortcode-elementor.php" instead of "elementor-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected96 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3261296

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/icon.png1.10KB0.17KB▼ 84.97%