83% link-media-from-tinymce

Code Review | Link media from TinyMCE

WordPress plugin Link media from TinyMCE scored83%from 54 tests.

About plugin

  • Plugin page: link-media-from-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 11, 2014
  • Latest release: Apr 13, 2014
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: Aurelien (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,310 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼4.54ms] Passed 4 tests

An overview of server-side resources used by Link media from TinyMCE
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.30 ▼2.70
Dashboard /wp-admin3.32 ▼0.0245.47 ▼15.75
Posts /wp-admin/edit.php3.37 ▲0.0246.86 ▲1.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.48 ▼0.82
Media Library /wp-admin/upload.php3.25 ▲0.0233.21 ▲1.92
Link media /wp-admin/options-general.php?page=deefuse_link_media_in_wsiwyg_options_page3.2129.93

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
deefuseLinkMediaInWysiwyg_type
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Link media from TinyMCE: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.19 ▼1.111.70 ▼0.0541.80 ▼1.83
Dashboard /wp-admin2,207 ▲195.82 ▼0.03104.39 ▼12.6538.73 ▼4.00
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0338.68 ▲2.9334.49 ▼2.03
Add New Post /wp-admin/post-new.php1,517 ▲317.76 ▲0.26682.17 ▲0.5261.76 ▲3.44
Media Library /wp-admin/upload.php1,392 ▲14.30 ▲0.1093.04 ▼6.2242.97 ▼2.42
Link media /wp-admin/options-general.php?page=deefuse_link_media_in_wsiwyg_options_page7882.1729.8328.24

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

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)
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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/link-media-from-tinymce/deefuse-link-media-in-wysiwyg.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/link-media-from-tinymce/uninstall.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

link-media-from-tinymce/deefuse-link-media-in-wysiwyg.php 92% from 13 tests

The entry point to "Link media from TinyMCE" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("link-media-from-tinymce.php" instead of "deefuse-link-media-in-wysiwyg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin153 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33222123
PO File1378330

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin