78% insert-reference

Code Review | Insert Link Reference In Copied Text

WordPress plugin Insert Link Reference In Copied Text scored78%from 54 tests.

About plugin

  • Plugin page: insert-reference
  • Plugin version: 2...
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Feb 11, 2022
  • Latest release: Jun 6, 2022
  • Number of updates: 8
  • Update frequency: every 14.6 days
  • Top authors: mushlih (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.15ms] Passed 4 tests

An overview of server-side resources used by Insert Link Reference In Copied Text
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.73 ▲2.52
Dashboard /wp-admin3.31 ▼0.0446.67 ▼13.93
Posts /wp-admin/edit.php3.36 ▲0.0044.40 ▼2.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.84 ▼15.14
Media Library /wp-admin/upload.php3.23 ▲0.0034.85 ▼1.44

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Insert Link Reference In Copied Text
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.36 ▼0.182.11 ▲0.3044.66 ▲4.59
Dashboard /wp-admin2,211 ▲315.64 ▼0.0595.06 ▲9.1742.81 ▲2.03
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0833.16 ▼4.0735.48 ▲0.45
Add New Post /wp-admin/post-new.php1,539 ▲1123.36 ▲0.27664.71 ▲8.0852.15 ▲0.50
Media Library /wp-admin/upload.php1,419 ▲194.28 ▲0.1893.80 ▼23.0842.18 ▼5.36

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/insert-reference/Setting.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/insert-reference/Functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/insert-reference/Reference.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: paste, copy, insert

insert-reference/Reference.php 85% from 13 tests

The main PHP file in "Insert Link Reference In Copied Text" ver. 2... adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("insert-reference.php" instead of "Reference.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "2...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin114 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31626104
HTML13010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin