84% internal-link-shortcode

Code Review | CF Internal Link Shortcode

WordPress plugin CF Internal Link Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: internal-link-sho...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.0
  • WordPress version: 6.3.1
  • First release: Nov 22, 2010
  • Latest release: Jun 24, 2022
  • Number of updates: 13
  • Update frequency: every 325.6 days
  • Top authors: crowdfavorite (53.85%)alexkingorg (53.85%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,794 total downloads

Benchmarks

Plugin footprint 82% 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.03MB] [CPU: ▼13.08ms] Passed 4 tests

Analyzing server-side resources used by CF Internal Link Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.94 ▼4.22
Dashboard /wp-admin3.35 ▲0.0048.89 ▼27.16
Posts /wp-admin/edit.php3.40 ▲0.0451.81 ▲1.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.30 ▼17.60
Media Library /wp-admin/upload.php3.27 ▲0.0436.17 ▼3.32

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/internal-link-shortcode/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CF Internal Link Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5713.34 ▼1.251.57 ▼0.1641.21 ▼1.96
Dashboard /wp-admin2,227 ▲274.84 ▼0.05101.81 ▼23.0138.30 ▼5.91
Posts /wp-admin/edit.php2,106 ▲62.02 ▼0.0240.92 ▲4.9134.73 ▼1.33
Add New Post /wp-admin/post-new.php6,322 ▲4,79121.75 ▼1.38848.00 ▲191.2762.96 ▲2.98
Media Library /wp-admin/upload.php1,406 ▲94.28 ▲0.1197.70 ▼19.5242.64 ▼5.17

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/internal-link-shortcode/internal-link-shortcode.php:27

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 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
8 plugin tags: page, permalink, lookup, link, internal...

internal-link-shortcode/internal-link-shortcode.php Passed 13 tests

The main PHP script in "CF Internal Link Shortcode" version 1.1.0 is automatically included on every request by WordPress
85 characters long description:
Site reorganization-proof internal linking via shortcodes, referencing page/post IDs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected279 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11237279

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png12.78KB3.83KB▼ 70.02%
screenshot2.png14.56KB4.60KB▼ 68.40%
screenshot3.png22.73KB7.78KB▼ 65.76%