74% profile-widget

Code Review | Profile widget

WordPress plugin Profile widget scored74%from 54 tests.

About plugin

  • Plugin page: profile-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4
  • WordPress version: 6.3.1
  • First release: Dec 6, 2012
  • Latest release: Apr 29, 2015
  • Number of updates: 13
  • Update frequency: every 68.2 days
  • Top authors: ryanhellyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /7,554 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.99ms] Passed 4 tests

This is a short check of server-side resources used by Profile widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.63 ▼31.26
Dashboard /wp-admin2.29 ▼1.0112.17 ▼36.19
Posts /wp-admin/edit.php2.29 ▼1.0611.80 ▼36.84
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.96 ▼95.67
Media Library /wp-admin/upload.php2.29 ▼0.949.55 ▼26.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Profile widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.401.74 ▼0.0445.48 ▼3.78
Dashboard /wp-admin2,206 ▲175.84 ▲0.86106.51 ▼11.4341.87 ▼2.91
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0340.08 ▼0.4636.79 ▲1.43
Add New Post /wp-admin/post-new.php1,547 ▲2818.03 ▼5.01613.08 ▼38.6862.50 ▲10.96
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0796.30 ▼0.9441.79 ▼1.98

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
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Profile_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_profwid-widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/profile-widget/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 your attention:
  • Screenshots: Screenshot #2 (The Profile widget as shown in the widgets section of the admin panel.) image required
The official readme.txt is a good inspiration

profile-widget/index.php 92% from 13 tests

Analyzing the main PHP file in "Profile widget" version 1.1
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("profile-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1247264
PO File16518

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.08
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin