10% social-accounts

Code Review | Social Accounts

WordPress plugin Social Accounts scored10%from 54 tests.

About plugin

  • Plugin page: social-accounts
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Jan 18, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 17
  • Update frequency: every 69.6 days
  • Top authors: ffto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,935 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/social-accounts/ffto-social-accounts-widget.php+2
    Function create_function() is deprecated

Server metrics [RAM: ▼1.74MB] [CPU: ▼50.99ms] Passed 4 tests

Analyzing server-side resources used by Social Accounts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.215.33 ▼33.59
Dashboard /wp-admin2.27 ▼1.036.17 ▼41.48
Posts /wp-admin/edit.php2.27 ▼1.096.95 ▼44.10
Add New Post /wp-admin/post-new.php2.27 ▼3.626.50 ▼84.77
Media Library /wp-admin/upload.php2.27 ▼0.966.04 ▼28.39
Social Accounts /wp-admin/options-general.php?page=ffto-social-accounts2.275.97

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 77 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_ffto_social_accounts_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Social Accounts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.43 ▲0.081.74 ▼0.0144.11 ▲1.20
Dashboard /wp-admin2,202 ▲225.62 ▼0.0399.85 ▲3.0841.44 ▼2.95
Posts /wp-admin/edit.php2,101 ▼22.02 ▲0.0135.37 ▼6.5932.52 ▼6.90
Add New Post /wp-admin/post-new.php1,541 ▲717.93 ▼0.49605.11 ▼44.2667.46 ▼9.96
Media Library /wp-admin/upload.php1,401 ▲44.27 ▼0.03103.44 ▲1.6044.51 ▲0.24
Social Accounts /wp-admin/options-general.php?page=ffto-social-accounts2,4172.2546.24115.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/social-accounts/ffto-social-accounts-widget.php+2
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_ffto_social_accounts_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ffto-social-accounts
    • > Deprecated in wp-content/plugins/social-accounts/ffto-social-accounts-widget.php+2
    Function create_function() is deprecated
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ffto-social-accounts
    • > Notice in wp-content/plugins/social-accounts/ffto-social-accounts.php+278
    Undefined index: rare

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-accounts/ffto-social-accounts-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/social-accounts/ffto-social-accounts.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
6 plugin tags: widget, account, social, profiles, accounts...

social-accounts/ffto-social-accounts.php 92% from 13 tests

The primary PHP file in "Social Accounts" version 1.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-accounts.php" instead of "ffto-social-accounts.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
There were no executable files found in this plugin610 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP27522482
JavaScript1300103
CSS26025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity25.00
▷ Minimum class complexity8.00
▷ Maximum class complexity42.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1161.11%
▷ Protected methods00.00%
▷ Private methods738.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
71 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons32/linkedin.png1.28KB1.40KB0.00%
images/icons16/deviantart.png0.80KB0.83KB0.00%
images/icons32/myspace.png1.33KB1.24KB▼ 6.53%
images/icons16/pinterest.png1.54KB0.66KB▼ 57.14%
images/icons16/yelp.png0.61KB0.59KB▼ 3.83%