84% user-profile-picture-social-networks

Code Review | User Profile Picture Social Networks

WordPress plugin User Profile Picture Social Networks scored84%from 54 tests.

About plugin

  • Plugin page: user-profile-pict...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 1, 2020
  • Latest release: Jul 25, 2021
  • Number of updates: 8
  • Update frequency: every 71.5 days
  • Top authors: ronalfy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /653 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.08ms] Passed 4 tests

A check of server-side resources used by User Profile Picture Social Networks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.85 ▼0.50
Dashboard /wp-admin3.36 ▲0.0545.01 ▼0.35
Posts /wp-admin/edit.php3.47 ▲0.1144.55 ▼4.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.50 ▼14.86
Media Library /wp-admin/upload.php3.28 ▲0.0532.71 ▲1.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by User Profile Picture Social Networks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.125.67 ▲4.0142.01 ▼3.72
Dashboard /wp-admin2,209 ▲215.88 ▼0.02102.92 ▼6.4539.52 ▲0.72
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0235.12 ▼6.5033.76 ▼2.06
Add New Post /wp-admin/post-new.php1,535 ▲223.12 ▲0.06679.97 ▼5.8748.84 ▼2.36
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.19106.39 ▼2.2045.70 ▲3.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'User_Profile_Picture_Social_Networks\\Plugin_Abstract' not found in wp-content/plugins/user-profile-picture-social-networks/php/class-plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'User_Profile_Picture_Social_Networks\\Plugin_Interface' not found in wp-content/plugins/user-profile-picture-social-networks/php/class-plugin-abstract.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: block, user profile, social networks, blocks, users

user-profile-picture-social-networks/user-profile-picture-social-networks.php 85% from 13 tests

The principal PHP file in "User Profile Picture Social Networks" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,038 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12161560904
JavaScript4107126
CSS2008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.12
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods5993.65%
▷ Protected methods00.00%
▷ Private methods46.35%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants7
▷ Global constants7100.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 images were found in this plugin