89% linkz-ai

Code Review | Linkz.ai - Automatic link previews on hover

WordPress plugin Linkz.ai - Automatic link previews on hover scored89%from 54 tests.

About plugin

  • Plugin page: linkz-ai
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2022
  • Latest release: Jan 4, 2023
  • Number of updates: 21
  • Update frequency: every 2.6 days
  • Top authors: vittor1o (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,016 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.60ms] Passed 4 tests

Server-side resources used by Linkz.ai - Automatic link previews on hover
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.61 ▲2.44
Dashboard /wp-admin3.31 ▼0.0347.54 ▼11.92
Posts /wp-admin/edit.php3.37 ▲0.0145.92 ▼3.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.97 ▼12.97
Media Library /wp-admin/upload.php3.24 ▲0.0138.44 ▲2.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 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

A check of browser resources used by Linkz.ai - Automatic link previews on hover
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.29 ▼1.081.73 ▼0.0844.08 ▲2.93
Dashboard /wp-admin2,209 ▲185.84 ▼0.05103.11 ▲1.8375.03 ▲33.15
Posts /wp-admin/edit.php2,108 ▲192.00 ▼0.1240.23 ▲3.8333.98 ▲2.18
Add New Post /wp-admin/post-new.php1,681 ▲14822.55 ▼0.48688.49 ▼1.6258.45 ▲0.24
Media Library /wp-admin/upload.php1,397 ▲94.29 ▲0.0396.82 ▼11.9576.75 ▲33.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

linkz-ai/init.php 92% from 13 tests

"Linkz.ai - Automatic link previews on hover" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("linkz-ai.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,439 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP37814499
Sass1610428
CSS121427
SVG20060
JavaScript16025

PHP code Passed 2 tests

An short overview of 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 complexity23.00
▷ Minimum class complexity19.00
▷ Maximum class complexity27.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods1453.85%
▷ Protected methods00.00%
▷ Private methods1246.15%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.71MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png196.39KB73.38KB▼ 62.63%
assets/screenshot-3.png129.51KB92.53KB▼ 28.55%
assets/img/icon.png1.06KB0.72KB▼ 31.89%
assets/icon-256x256.png15.76KB7.45KB▼ 52.73%
assets/icon-128x128.png6.05KB3.55KB▼ 41.30%