67% simple-urls

Code Review | Simple URLs - Link Cloaking, Product Displays, and Affiliate Link Management

WordPress plugin Simple URLs - Link Cloaking, Product Displays, and Affiliate Link Management scored67%from 54 tests.

About plugin

  • Plugin page: simple-urls
  • Plugin version: 121...
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2010
  • Latest release: Oct 19, 2023
  • Number of updates: 38
  • Update frequency: every 125.6 days
  • Top authors: lassoanalytics (50%)nathanrice (44.74%)studiopress (7.89%)Nick_theGeek (5.26%)

Code review

54 tests

User reviews

32 reviews

Install metrics

6,000+ active /174,721 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.59MB] [CPU: ▲10.98ms] Passed 4 tests

Analyzing server-side resources used by Simple URLs - Link Cloaking, Product Displays, and Affiliate Link Management
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3050.61 ▲8.47
Dashboard /wp-admin4.94 ▲1.6362.19 ▲6.95
Posts /wp-admin/edit.php5.11 ▲1.7567.17 ▲20.03
Add New Post /wp-admin/post-new.php7.61 ▲1.72113.45 ▲9.91
Media Library /wp-admin/upload.php4.95 ▲1.7156.88 ▲18.57
Onboarding /wp-admin/edit.php?post_type=surl&page=surl-onboarding6.7380.94
Dashboard /wp-admin/edit.php?post_type=surl5.9445.90
Settings /wp-admin/edit.php?post_type=surl&page=surl-settings-display6.7574.02
Import /wp-admin/edit.php?post_type=surl&page=surl-import6.7472.62

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 701 new files
Database: 3 new tables, 11 new options
New tables
wp_lasso_lite_url_details
wp_lasso_lite_revert
wp_lasso_lite_amazon_products
New WordPress options
widget_recent-posts
is_lasso_live_switch_to_new_ui
surl_lasso_version
can_compress_scripts
widget_theysaidso_widget
surl_is_visited_welcome_page
is_active_lasso_lite
surl_site_id
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

Simple URLs - Link Cloaking, Product Displays, and Affiliate Link Management: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17514.29 ▼0.061.75 ▲0.1245.47 ▲6.23
Dashboard /wp-admin2,334 ▲1575.62 ▲0.0184.60 ▼6.0583.31 ▲39.11
Posts /wp-admin/edit.php2,415 ▲3158.73 ▲6.75154.72 ▲119.4737.75 ▲2.25
Add New Post /wp-admin/post-new.php6,535 ▲5,00923.49 ▲0.391,041.44 ▲345.1340.05 ▼14.48
Media Library /wp-admin/upload.php1,483 ▲804.14 ▼0.1182.20 ▼24.8242.92 ▼5.39
Onboarding /wp-admin/edit.php?post_type=surl&page=surl-onboarding3,5929.74242.18141.32
Dashboard /wp-admin/edit.php?post_type=surl1,6739.28180.8489.43
Settings /wp-admin/edit.php?post_type=surl&page=surl-settings-display3,50810.13272.79134.32
Import /wp-admin/edit.php?post_type=surl&page=surl-import2,09710.23176.8871.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_lasso_lite_amazon_products
    • wp_lasso_lite_revert
    • wp_lasso_lite_url_details
  • This plugin does not fully uninstall, leaving 12 options in the database
    • surl_is_visited_welcome_page
    • db_upgraded
    • surl_site_id
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • is_lasso_live_switch_to_new_ui
    • surl_lasso_version
    • surl_is_pre_populated_amazon_api
    • is_active_lasso_lite
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 16× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/simple-urls/admin/views/onboarding/welcome-step.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/revert-confirm.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/url-save-progress.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/revert-all-confirm.php
    • > /wp-content/plugins/simple-urls/admin/views/education/dashboard.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/url-quick-detail.php
    • > /wp-content/plugins/simple-urls/admin/views/notifications/performance.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/customer-flow-confirm.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/url-add.php
    • > /wp-content/plugins/simple-urls/admin/views/modals/import-all-confirm.php
  • 330× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Symfony\\Contracts\\HttpClient\\ResponseStreamInterface' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/symfony/http-client/Response/ResponseStream.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'LassoLiteVendor\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/psr/log/Psr/Log/Test/TestLogger.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'LassoLiteVendor\\Http\\Client\\Common\\HttpClientPool\\HttpClientPool' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/php-http/client-common/src/HttpClientPool/RoundRobinClientPool.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'LassoLiteVendor\\Sentry\\Tracing\\Span' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/sentry/sentry/src/Tracing/Transaction.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Symfony\\Contracts\\HttpClient\\ResponseInterface' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/symfony/http-client/Response/TraceableResponse.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/php-http/httplug/src/Exception.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Http\\Client\\Common\\Plugin' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Http\\Client\\Common\\Plugin' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/php-http/client-common/src/Plugin/QueryDefaultsPlugin.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/guzzlehttp/psr7/src/FnStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'LassoLiteVendor\\Composer\\Plugin\\Capability\\CommandProvider' not found in wp-content/plugins/simple-urls/vendor-prefix/vendor/bamarni/composer-bin-plugin/src/CommandProvider.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Lasso's Link Details Page), #2 (Lasso's Link Groups Page), #3 (Lasso's Link Management Dashboard)
The official readme.txt is a good inspiration

simple-urls/plugin.php 77% from 13 tests

The main PHP script in "Simple URLs - Link Cloaking, Product Displays, and Affiliate Link Management" version 121... is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-urls.php" instead of "plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "121...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected47,956 lines of code in 665 files:
LanguageFilesBlank linesComment linesLines of code
PHP5813,69419,61438,595
JavaScript316223364,352
JSON9002,559
CSS13941452,017
HTML12711235
Bourne Shell128967176
XML10016
SVG5005
YAML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.98
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces90
Interfaces81
Traits25
Classes408
▷ Abstract classes163.92%
▷ Concrete classes39296.08%
▷ Final classes22557.40%
Methods2,859
▷ Static methods51217.91%
▷ Public methods2,43685.20%
▷ Protected methods1083.78%
▷ Private methods31511.02%
Functions283
▷ Named functions8630.39%
▷ Anonymous functions19769.61%
Constants315
▷ Global constants4213.33%
▷ Class constants27386.67%
▷ Public constants23184.62%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 3.08MB with 1.93MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png408.91KB133.89KB▼ 67.26%
admin/assets/images/opportunities-thumbnail.png1,019.24KB338.46KB▼ 66.79%
screenshot-3.png391.92KB127.93KB▼ 67.36%
assets/icon-128x128.png8.99KB4.83KB▼ 46.22%
assets/banner-772x250.png63.96KB21.99KB▼ 65.61%