78% shortcode-ui

Code Review | Shortcake (Shortcode UI)

WordPress plugin Shortcake (Shortcode UI) scored78%from 54 tests.

About plugin

  • Plugin page: shortcode-ui
  • Plugin version: 0.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 18, 2015
  • Latest release: Jan 17, 2019
  • Number of updates: 29
  • Update frequency: every 51.6 days
  • Top authors: danielbachhuber (62.07%)goldenapples (41.38%)

Code review

54 tests

User reviews

24 reviews

Install metrics

20,000+ active /361,243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.69ms] Passed 4 tests

Analyzing server-side resources used by Shortcake (Shortcode UI)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1934.39 ▼7.85
Dashboard /wp-admin3.57 ▲0.2748.26 ▲1.06
Posts /wp-admin/edit.php3.60 ▲0.2547.91 ▲3.79
Add New Post /wp-admin/post-new.php6.09 ▲0.2186.10 ▼7.74
Media Library /wp-admin/upload.php3.41 ▲0.1839.22 ▲4.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 144 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Shortcake (Shortcode UI)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲15514.57 ▲0.011.64 ▼0.3238.40 ▼3.79
Dashboard /wp-admin2,289 ▲1006.41 ▲1.49130.10 ▲23.9241.76 ▼0.46
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0236.32 ▲1.4634.26 ▼1.56
Add New Post /wp-admin/post-new.php1,551 ▲1823.35 ▲0.13673.62 ▼10.6541.58 ▼18.95
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0097.20 ▼0.4145.67 ▲2.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shortcode-ui/inc/templates/list-item.tpl.php
    • > /wp-content/plugins/shortcode-ui/inc/templates/media-frame.tpl.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/shortcode-ui/inc/templates/edit-form.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-ui/shortcode-ui.php:32

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 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots require images: #1 (Without Shortcake, shortcodes have a minimal UI.), #2 (But with Shortcake, TinyMCE will render the shortcode in a TinyMCE view.), #3 (And add a user-friendly UI to edit shortcode content and attributes.), #4 (Add new shortcodes to your post through "Add Media".)
You can look at the official readme.txt

shortcode-ui/shortcode-ui.php Passed 13 tests

"Shortcake (Shortcode UI)" version 0.7.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
37 characters long description:
User Interface for adding shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected15,493 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript793,3531,49212,021
PO File175045841,402
PHP112905001,033
CSS4832662
Sass4620312
JSON21063

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.14
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods57
▷ Static methods712.28%
▷ Public methods4680.70%
▷ Protected methods00.00%
▷ Private methods1119.30%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png39.06KB21.89KB▼ 43.96%
screenshot-3.png17.79KB10.38KB▼ 41.67%
screenshot-1.png29.92KB18.14KB▼ 39.38%
screenshot-4.png37.48KB19.93KB▼ 46.83%