78% link-to-wp-files

Code Review | Link to WordPress Files

WordPress plugin Link to WordPress Files scored78%from 54 tests.

About plugin

  • Plugin page: link-to-wp-files
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 15, 2018
  • Latest release: Mar 15, 2022
  • Number of updates: 11
  • Update frequency: every 138.5 days
  • Top authors: gaupoit (90.91%)profaceoff (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,118 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.35ms] Passed 4 tests

Analyzing server-side resources used by Link to WordPress Files
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.84 ▼4.16
Dashboard /wp-admin3.40 ▲0.1050.00 ▼5.89
Posts /wp-admin/edit.php3.51 ▲0.1654.16 ▲4.21
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.40 ▼11.54
Media Library /wp-admin/upload.php3.32 ▲0.0937.99 ▲0.21
Add New /wp-admin/post-new.php?post_type=attachment3.1932.88
All Files /wp-admin/edit.php?post_type=attachment3.1926.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Link to WordPress Files
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13914.53 ▲0.184.78 ▲2.7841.31 ▼7.06
Dashboard /wp-admin2,226 ▲495.62 ▲0.0289.60 ▼6.6541.17 ▼2.91
Posts /wp-admin/edit.php2,128 ▲282.00 ▲0.0541.99 ▲2.1836.76 ▲0.96
Add New Post /wp-admin/post-new.php1,388 ▼14015.93 ▼7.20552.66 ▼126.2457.28 ▲9.32
Media Library /wp-admin/upload.php1,428 ▲284.25 ▲0.0795.78 ▼3.7644.59 ▼4.01
Add New /wp-admin/post-new.php?post_type=attachment1,0112.2449.7533.51
All Files /wp-admin/edit.php?post_type=attachment1,4284.2285.7939.32

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_foo_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/link-to-wp-files/public/partials/pda-wp-magic-link-public-display.php
    • > /wp-content/plugins/link-to-wp-files/admin/partials/pda-wp-magic-link-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/link-to-wp-files/admin/class-pda-wp-magic-link-admin.php:170

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt is a good inspiration

link-to-wp-files/pda-link-to-wp-file.php 85% from 13 tests

The main file in "Link to WordPress Files" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("link-to-wp-files.php" instead of "pda-link-to-wp-file.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected3,161 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP14160606333
JavaScript3187992
Markdown121039
CSS34819
Bourne Shell1307

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.30
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.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
There are no PNG files in this plugin