89% link-shortener

Code Review | Link Shortner

WordPress plugin Link Shortner scored 89% from 54 tests.

About plugin

  • Plugin page: link-shortener
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Feb 2, 2023
  • Number of updates: 13
  • Update frequency: every 74.3 days
  • Top authors: dipakparmar443 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active / 5,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.17ms] Passed 4 tests

An overview of server-side resources used by Link Shortner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.91 ▼5.72
Dashboard /wp-admin3.31 ▲0.0141.41 ▼6.99
Posts /wp-admin/edit.php3.36 ▲0.0147.05 ▲0.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.47 ▼12.23
Media Library /wp-admin/upload.php3.24 ▲0.0134.98 ▲1.63

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Link Shortner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.171.75 ▲0.1540.13 ▼8.20
Dashboard /wp-admin2,209 ▲185.90 ▼0.00109.15 ▲7.4341.81 ▼0.38
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0340.61 ▼2.0834.64 ▼0.56
Add New Post /wp-admin/post-new.php6,464 ▲4,94420.31 ▼2.85906.59 ▲192.0860.60 ▼0.05
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0597.87 ▼11.6540.97 ▼2.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

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

The main PHP script in "Link Shortner" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected105 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3146278
JavaScript11627

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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