83% list-related-attachments-widget

Code Review | List Related Attachments

WordPress plugin List Related Attachments scored 83% from 54 tests.

About plugin

  • Plugin page: list-related-atta...
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2010
  • Latest release: Mar 13, 2019
  • Number of updates: 62
  • Update frequency: every 51.1 days
  • Top authors: baden03 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 9,508 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.02MB] [CPU: ▼2.22ms] Passed 4 tests

This is a short check of server-side resources used by List Related Attachments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.81 ▼6.10
Dashboard /wp-admin3.32 ▲0.0244.47 ▼1.95
Posts /wp-admin/edit.php3.37 ▲0.0249.04 ▲3.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.71 ▼1.13
Media Library /wp-admin/upload.php3.25 ▲0.0235.09 ▲0.31
List Related Attach /wp-admin/options-general.php?page=lra-optons3.2126.84

Server storage [IO: ▲0.02MB] [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, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_lra_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for List Related Attachments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.24 ▼1.551.52 ▼0.1939.67 ▼1.45
Dashboard /wp-admin2,213 ▲74.86 ▼0.01115.83 ▲5.6043.48 ▲1.70
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0334.99 ▼4.7131.97 ▼4.03
Add New Post /wp-admin/post-new.php1,536 ▲323.02 ▼0.26645.75 ▼42.2249.49 ▲1.28
Media Library /wp-admin/upload.php1,395 ▲134.21 ▲0.0196.19 ▼8.6041.03 ▼4.25
List Related Attach /wp-admin/options-general.php?page=lra-optons8752.1928.2627.43

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_lra_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/list-related-attachments-widget/lra.php:255

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #2, #3 in list-related-attachments-widget/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

list-related-attachments-widget/lra.php 92% from 13 tests

The entry point to "List Related Attachments" version 2.1.6 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("list-related-attachments-widget.php" instead of "lra.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected292 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14579292

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity19.50
▷ Minimum class complexity12.00
▷ Maximum class complexity27.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin