84% the-social-links

Code Review | The Social Links

WordPress plugin The Social Links scored84%from 54 tests.

About plugin

  • Plugin page: the-social-links
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8.1
  • WordPress version: 6.3.1
  • First release: May 16, 2011
  • Latest release: Nov 9, 2021
  • Number of updates: 95
  • Update frequency: every 40.3 days
  • Top authors: DigitalLeap (70.53%)Seags (30.53%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /134,559 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.55ms] Passed 4 tests

Analyzing server-side resources used by The Social Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.94 ▲7.04
Dashboard /wp-admin3.32 ▲0.0244.79 ▼6.48
Posts /wp-admin/edit.php3.38 ▲0.0242.34 ▼6.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.55 ▼11.42
Media Library /wp-admin/upload.php3.25 ▲0.0232.82 ▼2.18

Server storage [IO: ▲2.61MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
can_compress_scripts
the_social_links_version
the_social_links_settings
widget_the_social_links
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for The Social Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10314.46 ▼0.191.92 ▼0.0151.33 ▲8.86
Dashboard /wp-admin2,233 ▲454.85 ▼1.00102.42 ▼10.6439.81 ▼3.14
Posts /wp-admin/edit.php2,117 ▲312.09 ▲0.0636.29 ▲0.4634.45 ▲1.35
Add New Post /wp-admin/post-new.php1,535 ▲2117.94 ▲0.28690.20 ▲95.6154.52 ▼5.47
Media Library /wp-admin/upload.php1,412 ▲244.25 ▲0.0696.73 ▼0.6743.52 ▲0.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • the_social_links_version
    • widget_recent-comments
    • the_social_links_settings
    • db_upgraded
    • widget_the_social_links
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/the-social-links/src/html/admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SeagynDavis\\TheSocialLinks\\plugin_dir_path() in wp-content/plugins/the-social-links/the-social-links.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-social-links/src/widget-class.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/the-social-links/src/html/links.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: social networking, social bookmarks, social links, social

the-social-links/the-social-links.php 92% from 13 tests

This is the main PHP file of "The Social Links" version 2.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "4.2")

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
Everything looks great! No dangerous files found in this plugin8,973 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG2088,500
PHP981154394
CSS4112044
Markdown17035

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1178.57%
▷ Anonymous functions321.43%
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
No PNG files were detected