83% internal-linking-of-related-contents

Code Review | Internal Linking of Related Contents

WordPress plugin Internal Linking of Related Contents scored83%from 54 tests.

About plugin

  • Plugin page: internal-linking-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Nov 23, 2023
  • Number of updates: 22
  • Update frequency: every 45.0 days
  • Top authors: alexvtn (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /12,459 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.70ms] Passed 4 tests

Analyzing server-side resources used by Internal Linking of Related Contents
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.20 ▲1.11
Dashboard /wp-admin3.34 ▲0.0444.65 ▼2.57
Posts /wp-admin/edit.php3.45 ▲0.1047.22 ▼7.22
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.90 ▼6.12
Media Library /wp-admin/upload.php3.26 ▲0.0341.53 ▲5.74
Internal Linking of Related Contents /wp-admin/admin.php?page=ilrc_panel3.2331.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
category_children
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Internal Linking of Related Contents: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9314.22 ▼0.021.86 ▲0.2130.03 ▼15.26
Dashboard /wp-admin2,236 ▲565.57 ▼0.0693.55 ▼6.7685.01 ▲37.67
Posts /wp-admin/edit.php2,145 ▲422.10 ▲0.0939.16 ▼1.1538.22 ▲2.22
Add New Post /wp-admin/post-new.php1,715 ▲18921.83 ▼1.75760.61 ▲132.0361.13 ▲1.01
Media Library /wp-admin/upload.php1,441 ▲414.18 ▼0.01102.42 ▲5.9584.20 ▲41.55
Internal Linking of Related Contents /wp-admin/admin.php?page=ilrc_panel1,5612.8973.47108.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • category_children
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/internal-linking-of-related-contents/init.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/internal-linking-of-related-contents/core/includes/class-related-contents.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/internal-linking-of-related-contents/core/shortcode/shortcode.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/internal-linking-of-related-contents/core/admin/panel.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/internal-linking-of-related-contents/core/functions/style.php:70

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Template 1), #2 (Template 2), #3 (Template 3), #4 (Template 4 (Premium)), #5 (Template 5 (Premium)), #6 (Template 6 (Premium)), #7 (Template 7 (Premium)), #8 (Template 8 (Premium)), #9 (Template 9 (Premium))
You can look at the official readme.txt

internal-linking-of-related-contents/init.php 85% from 13 tests

"Internal Linking of Related Contents" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("internal-linking-of-related-contents.php" instead of "init.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin2,667 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP91,2511911,661
CSS412930709
PO File1214369272
JavaScript1201225

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity33.20
▷ Minimum class complexity3.00
▷ Maximum class complexity76.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
13 PNG files occupy 1.35MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/template-previews/template-1.png8.95KB4.05KB▼ 54.72%
core/assets/images/template-previews/template-3.png10.24KB4.36KB▼ 57.46%
screenshot-8.png148.67KB58.01KB▼ 60.98%
screenshot-9.png148.68KB57.92KB▼ 61.05%
screenshot-1.png127.58KB54.70KB▼ 57.12%