10% url-smasher

Code Review | URL Smasher

WordPress plugin URL Smasher scored10%from 54 tests.

About plugin

  • Plugin page: url-smasher
  • Plugin version: 3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2015
  • Latest release: Aug 11, 2023
  • Number of updates: 45
  • Update frequency: every 64.9 days
  • Top authors: rhellewell@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,007 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/url-smasher/url-smasher.php+274
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.87MB] [CPU: ▼54.11ms] Passed 4 tests

An overview of server-side resources used by URL Smasher
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.345.29 ▼36.28
Dashboard /wp-admin2.18 ▼1.176.27 ▼42.35
Posts /wp-admin/edit.php2.18 ▼1.229.17 ▼39.20
Add New Post /wp-admin/post-new.php2.18 ▼3.757.12 ▼98.59
Media Library /wp-admin/upload.php2.18 ▼1.096.73 ▼33.94
URL Smasher /wp-admin/options-general.php?page=url-smasher-options2.187.46

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for URL Smasher
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.28 ▲0.001.62 ▼0.6541.56 ▲0.07
Dashboard /wp-admin2,204 ▲335.63 ▲0.0685.27 ▼8.7739.24 ▼8.13
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0436.93 ▲0.3631.29 ▼8.48
Add New Post /wp-admin/post-new.php1,533 ▲723.32 ▲0.15636.77 ▼48.6951.88 ▼12.42
Media Library /wp-admin/upload.php1,406 ▲34.15 ▼0.0396.02 ▼9.0641.63 ▼3.54
URL Smasher /wp-admin/options-general.php?page=url-smasher-options1,0982.0025.8448.78

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
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/url-smasher/url-smasher.php+274
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=url-smasher-options
    • > Notice in wp-content/plugins/url-smasher/url-smasher.php+274
    Trying to access array offset on value of type bool

SRP 50% 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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/url-smasher/url-smasher.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: url shortener automatic googl

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

"URL Smasher" version 3.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin635 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP160146360
CSS2508266
XML1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 3.65MB with 3.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/url_smasher_logo.png147.45KB17.34KB▼ 88.24%
assets/url_smasher_icon_128x128.png79.30KB5.86KB▼ 92.61%
assets/icon-128x128-old.png73.90KB4.86KB▼ 93.42%
assets/banner-772x250.png740.43KB96.67KB▼ 86.94%
assets/icon-256x256.png572.81KB36.31KB▼ 93.66%