94% shorty

Code Review | Shorty - The Shortcode Manager

WordPress plugin Shorty - The Shortcode Manager scored 94% from 54 tests.

About plugin

  • Plugin page: shorty
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.5.3
  • WordPress version: 5.9.2
  • First release: Oct 20, 2015
  • Latest release: Jul 9, 2016
  • Number of updates: 19
  • Update frequency: every 13.8 days
  • Top authors: flowdee (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 2,804 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼317.03ms] Passed 4 tests

A check of server-side resources used by Shorty - The Shortcode Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.4862.74 ▲44.41
Dashboard /wp-admin3.48 ▲0.0836.39 ▲0.25
Posts /wp-admin/edit.php3.71 ▲0.0742.45 ▼1.99
Add New Post /wp-admin/post-new.php6.95 ▼0.0297.35 ▼1,269.50
Media Library /wp-admin/upload.php3.36 ▲0.0727.02 ▲3.14
Add New /wp-admin/post-new.php?post_type=shortcode3.6945.12
All Shortcodes /wp-admin/edit.php?post_type=shortcode3.4627.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Shorty - The Shortcode Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲3115.66 ▼0.387.14 ▲0.792.22 ▼0.37
Dashboard /wp-admin2,916 ▲586.12 ▼0.08120.55 ▼20.23163.23 ▼9.08
Posts /wp-admin/edit.php2,724 ▲333.25 ▲0.0163.25 ▼2.71142.00 ▼1.39
Add New Post /wp-admin/post-new.php1,719 ▲5821.15 ▲5.30459.89 ▲23.01165.54 ▲6.42
Media Library /wp-admin/upload.php1,737 ▲395.48 ▼0.02137.68 ▼5.54188.41 ▼0.60
Add New /wp-admin/post-new.php?post_type=shortcode2,89010.07199.13215.22
All Shortcodes /wp-admin/edit.php?post_type=shortcode1,4143.1660.43113.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 2× 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/shorty/shorty.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shorty/includes/admin/tinymce/tinymce.php:10

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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: manage shortcode, editor, shortcode manager, shorty, manage shortcodes...

shorty/shorty.php 85% from 13 tests

The entry point to "Shorty - The Shortcode Manager" version 1.2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

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
There were no executable files found in this plugin430 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9109105299
PO File1293486
JavaScript27245

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants3
▷ Global constants3100.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
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/admin/tinymce/assets/button.png1.53KB0.81KB▼ 47.06%