62% cutzy-url-shortener

Code Review | Cutzy URLs shortener

WordPress plugin Cutzy URLs shortener scored62%from 54 tests.

About plugin

  • Plugin page: cutzy-url-shortener
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Jan 30, 2022
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: dev-ide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /740 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.14MB] [CPU: ▼47.34ms] Passed 4 tests

Analyzing server-side resources used by Cutzy URLs shortener
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6214.57 ▼32.18
Dashboard /wp-admin2.88 ▼0.4316.19 ▼37.37
Posts /wp-admin/edit.php2.88 ▼0.4819.06 ▼32.84
Add New Post /wp-admin/post-new.php2.88 ▼3.0118.01 ▼86.96
Media Library /wp-admin/upload.php2.88 ▼0.3515.81 ▼24.48
Url ShortLik /wp-admin/tools.php?page=cutzy2.8819.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Cutzy URLs shortener
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.24 ▼0.332.15 ▲0.3943.16 ▼1.74
Dashboard /wp-admin2,211 ▲375.58 ▼0.0093.32 ▼11.1443.47 ▼8.41
Posts /wp-admin/edit.php2,143 ▲431.97 ▲0.0143.10 ▲3.2941.84 ▲5.11
Add New Post /wp-admin/post-new.php6,232 ▲4,70425.99 ▲2.92901.21 ▲234.7959.73 ▼2.50
Media Library /wp-admin/upload.php1,416 ▲194.24 ▼0.16100.78 ▼6.4445.88 ▼1.32
Url ShortLik /wp-admin/tools.php?page=cutzy9872.0023.6228.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cutzy-url-shortener/inc/cutzy-settings.php+31
    Undefined index: page
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=cutzy
    • > Notice in wp-content/plugins/cutzy-url-shortener/inc/cutzy-settings.php+32
    Undefined index: cutzy_guid
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=cutzy
    • > Notice in wp-content/plugins/cutzy-url-shortener/templates/settings.php+103
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/tools.php?page=cutzy
    • > Notice in wp-content/plugins/cutzy-url-shortener/inc/cutzy-settings.php+197
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cutzy-url-shortener/index.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WcutzyURLSettings' not found in wp-content/plugins/cutzy-url-shortener/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_cutzy_short_url() in wp-content/plugins/cutzy-url-shortener/templates/share.php:5

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Settings Panel Screenshot), #5 (Custom Post type selection checkbox.), #6 (Copy Shortener link from Front end.)
Please take inspiration from this readme.txt

cutzy-url-shortener/cutzy-proccess.php 85% from 13 tests

The main file in "Cutzy URLs shortener" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cutzy-url-shortener.php" instead of "cutzy-proccess.php")

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 plugin1,197 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10356120757
CSS2330291
PO File1323298
JavaScript17451

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions2288.00%
▷ Anonymous functions312.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected