89% relative-url-shortcode

Code Review | Relative URL ShortCode

WordPress plugin Relative URL ShortCode scored89%from 54 tests.

About plugin

  • Plugin page: relative-url-shor...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2016
  • Latest release: Feb 21, 2023
  • Number of updates: 5
  • Update frequency: every 507.8 days
  • Top authors: mainsufian (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /3,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by Relative URL ShortCode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0034.87 ▼8.27
Dashboard /wp-admin3.35 ▲0.0044.36 ▼9.58
Posts /wp-admin/edit.php3.40 ▲0.0053.37 ▲3.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0085.18 ▼5.26
Media Library /wp-admin/upload.php3.27 ▲0.0038.56 ▲2.08

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Relative URL ShortCode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.481.74 ▼0.1938.38 ▼7.03
Dashboard /wp-admin2,198 ▲245.64 ▲0.0998.57 ▼4.5841.82 ▼1.12
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0039.64 ▲3.4035.74 ▲0.81
Add New Post /wp-admin/post-new.php1,526 ▼1123.59 ▲5.46655.32 ▲22.7356.76 ▼17.88
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.0197.63 ▼4.9942.29 ▼6.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: "#"
The official readme.txt is a good inspiration

relative-url-shortcode/relative_url_shortcode.php 85% from 13 tests

"Relative URL ShortCode" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("relative-url-shortcode.php" instead of "relative_url_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1388

PHP code Passed 2 tests

This is a short overview 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.25
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin