84% joturl-link-shortener

Code Review | JotUrl Link Shortener

WordPress plugin JotUrl Link Shortener scored84%from 54 tests.

About plugin

  • Plugin page: joturl-link-short...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jul 22, 2019
  • Latest release: Jan 4, 2021
  • Number of updates: 15
  • Update frequency: every 35.9 days
  • Top authors: joturl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,779 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼0.18ms] Passed 4 tests

This is a short check of server-side resources used by JotUrl Link Shortener
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.76 ▼0.41
Dashboard /wp-admin3.64 ▲0.3459.46 ▼1.42
Posts /wp-admin/edit.php3.69 ▲0.3456.08 ▲6.07
Add New Post /wp-admin/post-new.php6.18 ▲0.2994.57 ▼2.40
Media Library /wp-admin/upload.php3.50 ▲0.2841.54 ▲3.50

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for JotUrl Link Shortener
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8213.55 ▼1.001.80 ▲0.1244.65 ▼2.74
Dashboard /wp-admin2,246 ▲695.15 ▼0.5294.60 ▼3.8539.38 ▼2.93
Posts /wp-admin/edit.php2,156 ▲562.32 ▲0.3541.78 ▲2.3434.15 ▼1.44
Add New Post /wp-admin/post-new.php1,577 ▲4923.67 ▲0.56689.89 ▲32.0938.67 ▼13.83
Media Library /wp-admin/upload.php1,451 ▲484.75 ▲0.56126.22 ▲18.7248.93 ▲4.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/joturl-link-shortener/joturl.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'JotUrl' not found in wp-content/plugins/joturl-link-shortener/pages/joturl-options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 56 tag instead of maximum 10
Please take inspiration from this readme.txt

joturl-link-shortener/joturl.php 92% from 13 tests

The main PHP file in "JotUrl Link Shortener" ver. 0.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("joturl-link-shortener.php" instead of "joturl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,925 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP83051121,260
JavaScript613130601
HTML13031
SVG10026
CSS7007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity32.83
▷ Minimum class complexity4.00
▷ Maximum class complexity117.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods82
▷ Static methods7085.37%
▷ Public methods8097.56%
▷ Protected methods00.00%
▷ Private methods22.44%
Functions13
▷ Named functions215.38%
▷ Anonymous functions1184.62%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected