10% urlyar

Code Review | URLYar URL Shortner

WordPress plugin URLYar URL Shortner scored 10% from 54 tests.

About plugin

  • Plugin page: urlyar
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.2
  • WordPress version: 5.8.1
  • First release: Jan 2, 2019
  • Latest release: Jan 25, 2019
  • Number of updates: 10
  • Update frequency: every 2.5 days
  • Top authors: Salamzadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 809 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/urlyar/include/class.ss_options.php+193
    Undefined index: urlserviceenable

Server metrics [RAM: ▼0.67MB] [CPU: ▼171.25ms] Passed 4 tests

Analyzing server-side resources used by URLYar URL Shortner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1230.97 ▼7.31
Dashboard /wp-admin2.98 ▼0.0725.11 ▼20.38
Posts /wp-admin/edit.php2.98 ▼0.1227.07 ▼20.77
Add New Post /wp-admin/post-new.php2.98 ▼2.4525.43 ▼635.71
Media Library /wp-admin/upload.php2.98 ▼0.0225.91 ▼8.13
URLYar /wp-admin/options-general.php?page=shorturl2.9833.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options
urlyar_urlfx

Browser metrics Passed 4 tests

URLYar URL Shortner: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11516.14 ▲0.659.30 ▼3.1945.25 ▼5.94
Dashboard /wp-admin2,978 ▲475.81 ▼0.17140.26 ▼3.99115.07 ▼7.56
Posts /wp-admin/edit.php2,762 ▲232.71 ▼0.0067.11 ▼8.5695.76 ▲1.05
Add New Post /wp-admin/post-new.php1,610 ▼7318.77 ▲0.02392.06 ▲25.20111.72 ▼1.82
Media Library /wp-admin/upload.php1,741 ▼664.97 ▼0.02158.22 ▼1.89124.41 ▲5.51
URLYar /wp-admin/options-general.php?page=shorturl1,7492.1166.08130.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5211
    add_contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab() instead.
  • Zombie WordPress options were found after uninstall: 1 option
    • urlyar_urlfx

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=shorturl
    • > User deprecated in wp-includes/functions.php+5211
    add_contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=shorturl
    • > Notice in wp-content/plugins/urlyar/include/options_page.php+267
    Undefined index: home
    • > GET request to /wp-admin/options-general.php?page=shorturl
    • > Notice in wp-content/plugins/urlyar/include/options_page.php+398
    Undefined variable: rh
    • > GET request to /wp-admin/options-general.php?page=shorturl
    • > Notice in wp-content/plugins/urlyar/include/class.ss_options.php+193
    Undefined index: apikey_urlyar

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
9 plugin tags: shorten, qr code, urlyar, qr, shortener...

urlyar/urlyar.php 92% from 13 tests

"URLYar URL Shortner" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,850 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP97059301,436
PO File16566211
CSS1335130
JavaScript2192173

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods83
▷ Static methods00.00%
▷ Public methods7084.34%
▷ Protected methods22.41%
▷ Private methods1113.25%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/cross.png0.64KB0.72KB0.00%
assets/css/tick.png0.52KB0.52KB0.00%