74% wp-textimage-linking-shortcode

Code Review | LCT Text/Image Linking Shortcode

WordPress plugin LCT Text/Image Linking Shortcode scored 74% from 54 tests.

About plugin

  • Plugin page: wp-textimage-link...
  • Plugin version: 4.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2013
  • Latest release: May 7, 2015
  • Number of updates: 29
  • Update frequency: every 19.3 days
  • Top authors: ircary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,300 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.90MB] [CPU: ▼48.23ms] Passed 4 tests

This is a short check of server-side resources used by LCT Text/Image Linking Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.51 ▲2.14
Dashboard /wp-admin2.05 ▼1.265.43 ▼42.69
Posts /wp-admin/edit.php2.05 ▼1.315.98 ▼38.12
Add New Post /wp-admin/post-new.php2.05 ▼3.845.98 ▼81.43
Media Library /wp-admin/upload.php2.05 ▼1.185.41 ▼30.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

LCT Text/Image Linking Shortcode: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9314.46 ▲0.031.97 ▲0.0843.36 ▲2.05
Dashboard /wp-admin2,209 ▲184.86 ▼1.03107.70 ▲6.9038.66 ▼2.04
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0440.66 ▲5.3436.04 ▼1.41
Add New Post /wp-admin/post-new.php6,540 ▲5,00723.44 ▲0.39948.49 ▲321.2257.84 ▲0.43
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0394.16 ▼4.7341.48 ▼2.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wptisc_admin_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-textimage-linking-shortcode/text-image-linking-shortcode.php on line 27
    • > PHP Warning
      include_once(): Failed opening 'ABSPATH/wp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-textimage-linking-shortcode/text-image-linking-shortcode.php on line 27
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-textimage-linking-shortcode/text-image-linking-shortcode.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/wp-textimage-linking-shortcode/text-image-linking-shortcode.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: shortcode, linking

wp-textimage-linking-shortcode/text-image-linking-shortcode.php 92% from 13 tests

"LCT Text/Image Linking Shortcode" version 4.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-textimage-linking-shortcode.php" instead of "text-image-linking-shortcode.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
There were no executable files found in this plugin305 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13734305

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
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
No PNG images were found in this plugin