74% mx-link-shortener

Code Review | Mx Link Shortener

WordPress plugin Mx Link Shortener scored74%from 54 tests.

About plugin

  • Plugin page: mx-link-shortener
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2022
  • Latest release: Aug 24, 2023
  • Number of updates: 6
  • Update frequency: every 58.0 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /582 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.95ms] Passed 4 tests

An overview of server-side resources used by Mx Link Shortener
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1941.74 ▼2.54
Dashboard /wp-admin3.49 ▲0.1953.00 ▼2.74
Posts /wp-admin/edit.php3.55 ▲0.1949.54 ▼0.39
Add New Post /wp-admin/post-new.php6.01 ▲0.1399.74 ▲1.86
Media Library /wp-admin/upload.php3.35 ▲0.1344.47 ▲6.34
Link Name /wp-admin/admin.php?page=mx-shortened-links3.3241.17
Link Shortener /wp-admin/options-general.php?page=mx-link-shortener3.3337.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 46 new files
Database: 1 new table, 6 new options
New tables
wp_mxmls_link_shortener
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Mx Link Shortener
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.82 ▼0.9310.88 ▲8.8742.14 ▼4.26
Dashboard /wp-admin2,215 ▲274.87 ▼1.03100.54 ▼14.3340.29 ▼3.34
Posts /wp-admin/edit.php2,092 ▲32.14 ▲0.1235.74 ▼2.6035.90 ▲0.20
Add New Post /wp-admin/post-new.php1,533 ▲1923.35 ▲5.82682.45 ▼11.9766.39 ▲7.84
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.05102.49 ▼13.5242.80 ▼5.33
Link Name /wp-admin/admin.php?page=mx-shortened-links7852.0523.1825.35
Link Shortener /wp-admin/options-general.php?page=mx-link-shortener8132.0524.4327.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mxmls_link_shortener
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/mx-link-shortener/includes/admin/views/hidemenu-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/mx-link-shortener/includes/admin/views/settings-page.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: cut link, short link, link shortener

mx-link-shortener/mx-link-shortener.php Passed 13 tests

The principal PHP file in "Mx Link Shortener" v. 1.1 is loaded by WordPress automatically on each request
72 characters long description:
This plugin shortens links and allows you to store them on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin14,372 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52671,63510,348
CSS42142,380
PHP27714386926
SVG100685
PO File18833

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.48
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes15.00%
Methods66
▷ Static methods1827.27%
▷ Public methods66100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants7
▷ Global constants7100.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