84% user-profile-block

Code Review | User Profile Block

WordPress plugin User Profile Block scored 84% from 54 tests.

About plugin

  • Plugin page: user-profile-block
  • Plugin version: 0.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: May 18, 2020
  • Latest release: Jul 30, 2020
  • Number of updates: 3
  • Update frequency: every 25.3 days
  • Top authors: Toro_Unit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,765 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.79ms] Passed 4 tests

A check of server-side resources used by User Profile Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.78 ▼0.20
Dashboard /wp-admin3.31 ▲0.0144.83 ▼3.51
Posts /wp-admin/edit.php3.36 ▲0.0147.45 ▼3.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.44 ▼18.69
Media Library /wp-admin/upload.php3.23 ▲0.0132.70 ▼1.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for User Profile Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.48 ▲0.181.72 ▼0.0040.96 ▼5.44
Dashboard /wp-admin2,209 ▲355.83 ▲0.8897.37 ▼9.8042.49 ▼10.14
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0440.61 ▲1.8835.10 ▲5.47
Add New Post /wp-admin/post-new.php6,413 ▲4,88020.41 ▼2.93847.41 ▲210.8057.58 ▲3.06
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0698.96 ▲3.4844.32 ▼1.33

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 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/user-profile-block/lib/template/user-profile-block/user-profile.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HAMWORKS\\User_Profile_Block\\Block' not found in wp-content/plugins/user-profile-block/lib/class-user-profile.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: blocks

user-profile-block/user-profile-block.php Passed 13 tests

The primary PHP file in "User Profile Block" version 0.0.3 is used by WordPress to initiate all plugin functionality
18 characters long description:
User Profile Block

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected19,379 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON41019,046
PHP52991122
JavaScript6915117
YAML28355
XML14725
CSS23014

PHP code Passed 2 tests

A brief analysis 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.15
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods225.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin