10% links-dropdown-widget

Code Review | Dropdown Links Widget

WordPress plugin Dropdown Links Widget scored10%from 54 tests.

About plugin

  • Plugin page: links-dropdown-wi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Jan 24, 2014
  • Latest release: Jul 2, 2016
  • Number of updates: 9
  • Update frequency: every 98.9 days
  • Top authors: jacking83 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /6,256 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/links-dropdown-widget/plugin.php+143
    Function create_function() is deprecated

Server metrics [RAM: ▼1.92MB] [CPU: ▼49.57ms] Passed 4 tests

An overview of server-side resources used by Dropdown Links Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.403.98 ▼33.62
Dashboard /wp-admin2.08 ▼1.225.30 ▼40.63
Posts /wp-admin/edit.php2.08 ▼1.275.44 ▼41.12
Add New Post /wp-admin/post-new.php2.08 ▼3.805.62 ▼82.90
Media Library /wp-admin/upload.php2.08 ▼1.145.57 ▼29.03
Add New /wp-admin/link-add.php2.095.71
All Links /wp-admin/link-manager.php2.106.21
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category2.095.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_links-dropdown-widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Dropdown Links Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.29 ▼1.361.52 ▼0.1740.00 ▼6.07
Dashboard /wp-admin2,234 ▲495.79 ▼0.0798.31 ▼5.6740.03 ▼4.57
Posts /wp-admin/edit.php2,117 ▲282.00 ▼0.0037.40 ▲1.8733.60 ▼2.94
Add New Post /wp-admin/post-new.php1,572 ▲3523.50 ▲0.27667.77 ▼10.5355.89 ▼3.74
Media Library /wp-admin/upload.php1,416 ▲284.26 ▲0.0099.58 ▼2.0740.75 ▼3.91
Add New /wp-admin/link-add.php1,6412.2651.0235.55
All Links /wp-admin/link-manager.php1,0561.6827.5829.32
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category1,3022.1425.7229.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/links-dropdown-widget/plugin.php+143
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_links-dropdown-widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=link_category
    • > Deprecated in wp-content/plugins/links-dropdown-widget/plugin.php+143
    Function create_function() is deprecated

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
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/links-dropdown-widget/plugin.php:30
    • > PHP Notice
      Undefined variable: link_cat in wp-content/plugins/links-dropdown-widget/views/widget.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bookmarks() in wp-content/plugins/links-dropdown-widget/views/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function linkdrop_categories_to_array() in wp-content/plugins/links-dropdown-widget/views/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

links-dropdown-widget/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Dropdown Links Widget" version 1.1
Please make the necessary changes and fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("links-dropdown-widget.php" instead of "plugin.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 plugin129 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34655117
CSS11012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png4.29KB2.04KB▼ 52.52%
screenshot-1.png18.14KB6.08KB▼ 66.47%