57% url-shortify

Code Review | URL Shortify - Simple, Powerful and Easy URL Shortener Plugin For WordPress

WordPress plugin URL Shortify - Simple, Powerful and Easy URL Shortener Plugin For WordPress scored57%from 54 tests.

About plugin

  • Plugin page: url-shortify
  • Plugin version: 1.7.9.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 7, 2020
  • Latest release: Nov 17, 2023
  • Number of updates: 233
  • Update frequency: every 5.5 days
  • Top authors: kaizencoders (100%)

Code review

54 tests

User reviews

111 reviews

Install metrics

10,000+ active /198,294 total downloads

Benchmarks

Plugin footprint 47% 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: ▲6.02MB] [CPU: ▲43.10ms] 50% from 4 tests

An overview of server-side resources used by URL Shortify - Simple, Powerful and Easy URL Shortener Plugin For WordPress
The following require your attention
  • RAM: Total memory usage should be kept under 10MB (currently 10.04MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 6.02MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.02 ▲6.5685.86 ▲43.64
Dashboard /wp-admin10.04 ▲6.6998.28 ▲38.83
Posts /wp-admin/edit.php10.04 ▲6.6887.43 ▲43.65
Add New Post /wp-admin/post-new.php10.04 ▲4.15133.30 ▲46.26
Media Library /wp-admin/upload.php10.04 ▲6.8190.68 ▲54.89
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.0478.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 769 new files
Database: 6 new tables, 14 new options
New tables
wp_kc_us_groups
wp_kc_us_links_groups
wp_kc_us_clicks
wp_kc_us_utm_presets
wp_kc_us_domains
wp_kc_us_links
New WordPress options
widget_theysaidso_widget
fs_active_plugins
widget_recent-posts
db_upgraded
kc_us_bookmarklet_secret
widget_recent-comments
kc_us_db_update_history
fs_accounts
kc_us_db_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

URL Shortify - Simple, Powerful and Easy URL Shortener Plugin For WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,053 ▲29113.82 ▼0.529.27 ▲7.6331.61 ▼12.27
Dashboard /wp-admin2,333 ▲1535.77 ▲0.1290.38 ▼9.5272.29 ▲26.42
Posts /wp-admin/edit.php2,171 ▲682.15 ▲0.2139.88 ▼0.0936.50 ▼3.30
Add New Post /wp-admin/post-new.php1,581 ▲5521.24 ▼1.79766.82 ▲120.3979.76 ▲18.03
Media Library /wp-admin/upload.php1,442 ▲424.24 ▲0.03104.66 ▲7.0844.52 ▲2.09
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0941.7125.1627.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/url-shortify/libs/fs/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 6 tables
    • wp_kc_us_clicks
    • wp_kc_us_groups
    • wp_kc_us_utm_presets
    • wp_kc_us_links_groups
    • wp_kc_us_links
    • wp_kc_us_domains
  • This plugin did not uninstall successfully, leaving 14 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • kc_us_plugin_secret
    • kc_us_bookmarklet_secret
    • widget_recent-comments
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_active_plugins
    • can_compress_scripts
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/url-shortify/lite/includes/Admin/Templates/landing.php
    • > /wp-content/plugins/url-shortify/lite/includes/Admin/Templates/widgets/dashboard-widget.php
  • 139× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kaizen_Coders\\Url_Shortify\\Admin\\Controllers\\BaseController' not found in wp-content/plugins/url-shortify/lite/includes/Admin/Controllers/GroupsController.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/url-shortify/lite/includes/API/V1/LinksRestController.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/url-shortify/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Kaizen_Coders\\Url_Shortify\\Helper' not found in wp-content/plugins/url-shortify/lite/includes/Admin/Templates/link-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/url-shortify/lite/language.php:4

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: short links, cloaking, url shortener, link branding, link tracking...

url-shortify/url-shortify.php 92% from 13 tests

The main PHP script in "URL Shortify - Simple, Powerful and Easy URL Shortener Plugin For WordPress" version 1.7.9.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

Code Analysis 97% from 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
There were no executable files found in this plugin76,738 lines of code in 672 files:
LanguageFilesBlank linesComment linesLines of code
PHP30912,64224,04548,644
SVG2921927914,337
JavaScript382,4692,13810,658
HTML4390381,714
CSS2120272729
JSON300295
Markdown2740238
YAML3313123

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity28.95
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces12
Interfaces0
Traits1
Classes213
▷ Abstract classes41.88%
▷ Concrete classes20998.12%
▷ Final classes00.00%
Methods2,088
▷ Static methods37818.10%
▷ Public methods1,57575.43%
▷ Protected methods1205.75%
▷ Private methods39318.82%
Functions132
▷ Named functions12695.45%
▷ Anonymous functions64.55%
Constants256
▷ Global constants11444.53%
▷ Class constants14255.47%
▷ Public constants142100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
39 PNG files occupy 0.27MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lite/dist/assets/images/cpt/page.png4.12KB4.59KB0.00%
lite/dist/assets/settings/assets/vendor/jquery-timepicker/timepicker.png5.61KB4.02KB▼ 28.31%
lite/dist/assets/settings/assets/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
lite/dist/assets/images/cpt/mec-events-24x24.png1.49KB1.52KB0.00%
libs/fs/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%