77% profile-views-for-ultimate-member

Code Review | Profile Views for Ultimate Member

WordPress plugin Profile Views for Ultimate Member scored77%from 54 tests.

About plugin

  • Plugin page: profile-views-for...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2022
  • Latest release: Sep 21, 2023
  • Number of updates: 3
  • Update frequency: every 132.3 days
  • Top authors: simplewpplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /751 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼15.58ms] Passed 4 tests

This is a short check of server-side resources used by Profile Views for Ultimate Member
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.76 ▼3.76
Dashboard /wp-admin3.32 ▼0.0347.98 ▼22.51
Posts /wp-admin/edit.php3.37 ▲0.0148.10 ▼5.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.30 ▼30.33
Media Library /wp-admin/upload.php3.24 ▲0.0139.75 ▼1.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Profile Views for Ultimate Member
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.26 ▼0.092.09 ▲0.3244.53 ▲0.46
Dashboard /wp-admin2,202 ▲255.56 ▼0.0983.62 ▼13.1042.55 ▼6.15
Posts /wp-admin/edit.php2,110 ▲101.99 ▲0.0233.49 ▼2.0436.86 ▲0.84
Add New Post /wp-admin/post-new.php1,543 ▲1423.12 ▼0.30689.92 ▲12.1452.14 ▼0.02
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0495.49 ▼10.6241.84 ▼1.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/viewers.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/profile-views-for-ultimate-member/profile-views-for-um.php:22
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/viewers.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/no-viewer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_profile_id() in wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/panel.php:1
    • > PHP Notice
      Undefined variable: viewers in wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/viewers.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/profile-views-for-ultimate-member/templates/ajax/not-authorised.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function um_profile_id() in wp-content/plugins/profile-views-for-ultimate-member/templates/views-icon.php:1

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 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

profile-views-for-ultimate-member/profile-views-for-um.php 77% from 13 tests

The primary PHP file in "Profile Views for Ultimate Member" version 1.2.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "3.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("profile-views-for-ultimate-member.php" instead of "profile-views-for-um.php")

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
Good job! No executable or dangerous file extensions detected804 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1426989538
CSS2324179
JavaScript222487

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
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
PNG images were not found in this plugin