84% basic-url-shortcodes

Code Review | Basic URL ShortCodes

WordPress plugin Basic URL ShortCodes scored84%from 54 tests.

About plugin

  • Plugin page: basic-url-shortcodes
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Aug 20, 2023
  • Number of updates: 18
  • Update frequency: every 123.5 days
  • Top authors: devikas301 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /1,880 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.88ms] Passed 4 tests

This is a short check of server-side resources used by Basic URL ShortCodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.65 ▼1.55
Dashboard /wp-admin3.31 ▲0.0146.29 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0047.25 ▼0.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.33 ▼16.70
Media Library /wp-admin/upload.php3.24 ▲0.0038.63 ▲6.55

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

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

Browser metrics Passed 4 tests

Basic URL ShortCodes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.111.76 ▲0.1538.39 ▼5.81
Dashboard /wp-admin2,192 ▲155.54 ▼0.0288.78 ▼3.0240.89 ▲0.17
Posts /wp-admin/edit.php2,097 ▼61.97 ▼0.0339.03 ▼3.5035.10 ▲0.60
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▼0.02666.15 ▲31.1149.65 ▼1.82
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0695.96 ▼1.4543.55 ▲1.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/basic-url-shortcodes/ro_burl_short_codes.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Sample short code use.), #2 (Rendered output.)
The official readme.txt is a good inspiration

basic-url-shortcodes/ro_burl_short_codes.php 92% from 13 tests

The main PHP script in "Basic URL ShortCodes" version 4.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("basic-url-shortcodes.php" instead of "ro_burl_short_codes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131123

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png18.18KB7.54KB▼ 58.50%
screenshot-1.png18.24KB6.82KB▼ 62.62%