78% easy-social-links

Code Review | Easy Social Links

WordPress plugin Easy Social Links scored78%from 54 tests.

About plugin

  • Plugin page: easy-social-links
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: Dec 5, 2020
  • Number of updates: 12
  • Update frequency: every 1.3 days
  • Top authors: mochabearteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Easy Social Links
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.48 ▼5.10
Dashboard /wp-admin3.32 ▲0.0248.11 ▼4.80
Posts /wp-admin/edit.php3.37 ▲0.0248.78 ▼6.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.86 ▼22.61
Media Library /wp-admin/upload.php3.24 ▲0.0237.78 ▲1.60
Social Links /wp-admin/tools.php?page=easy-social-links3.2432.17

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

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

Browser metrics Passed 4 tests

Easy Social Links: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.28 ▼0.931.65 ▼0.3344.09 ▲1.24
Dashboard /wp-admin2,222 ▲255.83 ▼0.0398.11 ▼12.4537.03 ▼2.76
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0037.56 ▼0.1733.66 ▲0.04
Add New Post /wp-admin/post-new.php1,548 ▲2323.39 ▲5.84643.83 ▲46.0053.93 ▼3.22
Media Library /wp-admin/upload.php1,398 ▼24.25 ▲0.0597.54 ▼0.6942.49 ▼3.90
Social Links /wp-admin/tools.php?page=easy-social-links2,2581.9241.5742.99

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • mbesl-version
    • widget_recent-posts

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-social-links/easy-social-links.php
    • > /wp-content/plugins/easy-social-links/includes/class-base.php
    • > /wp-content/plugins/easy-social-links/includes/class-shortcode.php
    • > /wp-content/plugins/easy-social-links/includes/class-submenu.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function build_social_medias() on null in wp-content/plugins/easy-social-links/includes/template-submenu.php:15
    • > PHP Notice
      Trying to get property 'Submenu' of non-object in wp-content/plugins/easy-social-links/includes/template-submenu.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: social, shortcode

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

The primary PHP file in "Easy Social Links" version 1.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected875 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP58514507
CSS24429227
JavaScript1172141

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin