94% basic-url-shortcodes

Code Review | Basic URL ShortCodes

WordPress plugin Basic URL ShortCodes scored 94% from 54 tests.

About plugin

  • Plugin page: basic-url-shortcodes
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.6
  • WordPress version: 5.8.1
  • First release: Jul 20, 2017
  • Latest release: Dec 6, 2020
  • Number of updates: 15
  • Update frequency: every 82.4 days
  • Top authors: devikas301 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 809 total downloads

Benchmarks

Plugin footprint Passed 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: ▼146.58ms] 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 /2.84 ▲0.1233.71 ▲10.57
Dashboard /wp-admin3.06 ▲0.0146.68 ▼20.46
Posts /wp-admin/edit.php3.11 ▲0.0046.61 ▼6.06
Add New Post /wp-admin/post-new.php5.42 ▼0.0292.36 ▼560.83
Media Library /wp-admin/upload.php3.00 ▲0.0034.19 ▲1.04

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, no new options

Browser metrics Passed 4 tests

Basic URL ShortCodes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.01 ▲0.0911.79 ▲1.8848.26 ▼10.42
Dashboard /wp-admin2,964 ▲335.93 ▼0.20142.74 ▼37.65104.60 ▼20.65
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0166.27 ▲0.8890.84 ▲4.77
Add New Post /wp-admin/post-new.php1,683 ▲6818.76 ▼2.82402.69 ▲108.46104.94 ▲4.44
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.03154.33 ▼7.87114.59 ▼6.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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 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 plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121014

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.40
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%
Functions2
▷ Named functions2100.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%