10% shortcodes-ui

Code Review | ShortCodes UI

WordPress plugin ShortCodes UI scored10%from 54 tests.

About plugin

  • Plugin page: shortcodes-ui
  • Plugin version: 1.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.0.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2011
  • Latest release: Sep 18, 2014
  • Number of updates: 52
  • Update frequency: every 21.0 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /41,454 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/shortcodes-ui/classes/widget.class.php+49
    Function create_function() is deprecated

Server metrics [RAM: ▼1.65MB] [CPU: ▼49.92ms] Passed 4 tests

A check of server-side resources used by ShortCodes UI
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.137.01 ▼35.07
Dashboard /wp-admin2.35 ▼0.958.10 ▼42.56
Posts /wp-admin/edit.php2.35 ▼1.006.73 ▼41.45
Add New Post /wp-admin/post-new.php2.35 ▼3.537.56 ▼80.59
Media Library /wp-admin/upload.php2.35 ▼0.886.30 ▼27.90
Short Codes /wp-admin/edit.php?post_type=ba_sh2.357.46
Categories /wp-admin/edit-tags.php?taxonomy=bs_sh_cats&post_type=ba_sh2.358.80
Settings /wp-admin/edit.php?post_type=ba_sh_settings2.359.49
Import/Export /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie2.357.72
Add New /wp-admin/post-new.php?post_type=ba_sh2.3512.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_shortcodeui
widget_theysaidso_widget
db_upgraded

Browser metrics 75% from 4 tests

ShortCodes UI: an overview of browser usage
You may want to improve the following
  • Script duration: Try to keep JavaScript execution under 1,500.00ms (currently 1,514.50ms on /wp-admin/post-new.php?post_type=ba_sh)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.46 ▼0.914.54 ▲2.4940.85 ▼3.99
Dashboard /wp-admin2,247 ▲555.86 ▲0.93101.85 ▼8.1680.65 ▲41.39
Posts /wp-admin/edit.php2,130 ▲412.15 ▲0.1735.25 ▼5.8633.65 ▼1.46
Add New Post /wp-admin/post-new.php1,574 ▲4023.21 ▼0.02682.95 ▼8.2334.78 ▼18.88
Media Library /wp-admin/upload.php1,429 ▲414.23 ▼0.1798.36 ▼4.7571.66 ▲29.05
Short Codes /wp-admin/edit.php?post_type=ba_sh3,51842.951,254.2030.48
Categories /wp-admin/edit-tags.php?taxonomy=bs_sh_cats&post_type=ba_sh1,3022.1436.1936.37
Settings /wp-admin/edit.php?post_type=ba_sh_settings280.440.124.23
Import/Export /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie9331.9635.9361.26
Add New /wp-admin/post-new.php?post_type=ba_sh6,35560.861,514.50193.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/shortcodes-ui/classes/widget.class.php+49
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_shortcodeui
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Deprecated in wp-content/plugins/shortcodes-ui/classes/widget.class.php+49
    Function create_function() is deprecated
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Warning in wp-content/plugins/shortcodes-ui/classes/meta-box-class/my-meta-box-class.php+580
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
Please take a closer look at the following
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shortcodes-ui/classes/widget.class.php
    • > /wp-content/plugins/shortcodes-ui/classes/plugin.info.class.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.ui.help.tabs.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.external.files.meta.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.ui.import.export.page.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.advanced.meta.php
    • > /wp-content/plugins/shortcodes-ui/classes/shortcodes.ui.ajax.class.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.ui.admin.pages.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.settings.meta.php
    • > /wp-content/plugins/shortcodes-ui/config/shortcode.author.meta.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shortcodes-ui/shortcode-maker.php:64

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=ba_sh_settings
    • > Network (severe)
    wp-admin/edit.php?post_type=ba_sh_settings - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie
    • > Network (severe)
    wp-content/plugins/shortcodes-ui/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie
    • > Network (severe)
    wp-content/plugins/shortcodes-ui/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie
    • > Network (severe)
    wp-content/plugins/shortcodes-ui/css/images/ui-bg_glass_50_3baae3_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=ba_sh&page=sc_ui_ie
    • > Network (severe)
    wp-content/plugins/shortcodes-ui/css/images/ui-bg_glass_80_d7ebf9_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=ba_sh:483:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=ba_sh:507:43)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/shortcodes-ui/classes/meta-box-class/js/meta-box.js:137:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/shortcodes-ui/js/insert_shortcode.js?ver=6.3.1:45:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=ba_sh
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: shortcode, shortcode generator, shortcode maker, snippet manager, snippet ui...

shortcodes-ui/shortcode-maker.php 92% from 13 tests

The entry point to "ShortCodes UI" version 1.9.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shortcodes-ui.php" instead of "shortcode-maker.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin11,860 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript128819657,256
PHP135201,5053,011
CSS81991411,449
PO File43644144

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity73.12
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods174
▷ Static methods00.00%
▷ Public methods17097.70%
▷ Protected methods00.00%
▷ Private methods42.30%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/meta-box-class/js/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
classes/meta-box-class/js/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
classes/meta-box-class/js/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
classes/meta-box-class/js/select2/select2x2.png0.83KB0.77KB▼ 6.15%
classes/meta-box-class/js/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%