84% url-path-shortcodes

Code Review | URL & Path Shortcodes

WordPress plugin URL & Path Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: url-path-shortcodes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2012
  • Latest release: Sep 29, 2012
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: gilbitron (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /3,084 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.01MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by URL & Path Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.30 ▼5.10
Dashboard /wp-admin3.31 ▲0.0149.13 ▼3.42
Posts /wp-admin/edit.php3.36 ▲0.0150.46 ▲0.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.86 ▼9.84
Media Library /wp-admin/upload.php3.24 ▲0.0135.11 ▼1.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for URL & Path Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▲0.025.06 ▲0.0643.00 ▼3.54
Dashboard /wp-admin2,206 ▲185.83 ▲0.9597.91 ▼21.7238.74 ▼3.15
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0134.60 ▼1.9332.87 ▲1.11
Add New Post /wp-admin/post-new.php1,514 ▼1417.44 ▼0.84606.66 ▼54.9754.04 ▼10.29
Media Library /wp-admin/upload.php1,385 ▼04.18 ▼0.04101.21 ▲2.8144.82 ▲4.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/url-path-shortcodes/url-path-shortcodes.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 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
4 plugin tags: shortcode, path, shortcodes, url

url-path-shortcodes/url-path-shortcodes.php Passed 13 tests

"URL & Path Shortcodes" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
Allows you to use common WordPress URL's and Paths in the post editor using shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13212107

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin