10% recommended-links

Code Review | Recommended Links for WordPress

WordPress plugin Recommended Links for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: recommended-links
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 27, 2011
  • Latest release: May 25, 2012
  • Number of updates: 30
  • Update frequency: every 5.0 days
  • Top authors: goldenapples (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,077 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/recommended-links/widgets.php+186
    Methods with the same name as their class will not be constructors in a future version of PHP; RecLinks_Bookmarklet has a deprecated constructor

Server metrics [RAM: ▼1.69MB] [CPU: ▼48.15ms] Passed 4 tests

A check of server-side resources used by Recommended Links for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.149.54 ▼27.48
Dashboard /wp-admin2.33 ▼1.029.46 ▼56.58
Posts /wp-admin/edit.php2.33 ▼1.0310.42 ▼33.34
Add New Post /wp-admin/post-new.php2.33 ▼3.5611.26 ▼75.21
Media Library /wp-admin/upload.php2.33 ▼0.9010.69 ▼25.13
RecLinks /wp-admin/edit.php?post_type=reclink2.3310.80
Plugin Settings /wp-admin/edit.php?post_type=reclink&page=reclinks_plugin_settings2.3312.41
Add New /wp-admin/post-new.php?post_type=reclink2.339.99

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 21 new files
Database: 1 new table, 11 new options
New tables
wp_reclinks_votes
New WordPress options
widget_recent-posts
reclinks_db_version
widget_theysaidso_widget
reclinks_plugin_options
widget_reclinks_bookmarklet
widget_reclinks_addlink
theysaidso_admin_options
widget_reclinks_current
widget_recent-comments
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Recommended Links for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲21014.03 ▼0.416.09 ▲4.3344.57 ▼3.83
Dashboard /wp-admin2,240 ▲524.86 ▼0.17108.78 ▲7.7541.46 ▲2.13
Posts /wp-admin/edit.php2,120 ▲311.98 ▼0.0839.26 ▼0.8634.55 ▼0.66
Add New Post /wp-admin/post-new.php1,558 ▲1423.37 ▲5.11602.45 ▼0.5268.68 ▲4.55
Media Library /wp-admin/upload.php1,419 ▲344.16 ▼0.1098.30 ▼2.1643.98 ▲0.12
RecLinks /wp-admin/edit.php?post_type=reclink1,1631.9533.4232.46
Plugin Settings /wp-admin/edit.php?post_type=reclink&page=reclinks_plugin_settings1,0142.0622.8731.92
Add New /wp-admin/post-new.php?post_type=reclink2,6397.87175.0164.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in RecLinks_Add_Form is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie tables were found after uninstall: 1 table
    • wp_reclinks_votes
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_reclinks_current
    • can_compress_scripts
    • reclinks_db_version
    • widget_reclinks_bookmarklet
    • reclinks_plugin_options
    • theysaidso_admin_options
    • widget_reclinks_addlink
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reclink
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in RecLinks_Add_Form is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reclink
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in RecLinks_Display_Links is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=reclink
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in RecLinks_Bookmarklet is deprecated since version 4.3.0! Use __construct() instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/recommended-links/admin/options-archives.php
    • > /wp-content/plugins/recommended-links/admin/options-about.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recommended-links/recommended-links.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recommended-links/admin/options-general.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/recommended-links/display-shortcodes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recommended-links/loop-reclinks.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recommended-links/admin/options-bookmarklet.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/recommended-links/ajax-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommended-links/user-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommended-links/admin-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/recommended-links/display-filters.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommended-links/widgets.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)
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: voting, social bookmarking, digg, reddit, sharing

recommended-links/recommended-links.php Passed 13 tests

This is the main PHP file of "Recommended Links for WordPress" version 0.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
A "reddit clone" that runs in Wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,522 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP133113091,306
CSS111293
JavaScript10072
CoffeeScript10051

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.67
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon16.png0.78KB0.70KB▼ 10.99%
images/minus-plus.png1.24KB1.05KB▼ 15.59%
images/recommend.png2.62KB1.68KB▼ 36.10%
images/minus-plus-small.png0.65KB0.82KB0.00%