68% stackoverflow-profile-widget

Code Review | StackOverflow Profile

WordPress plugin StackOverflow Profile scored68%from 54 tests.

About plugin

  • Plugin page: stackoverflow-pro...
  • Plugin version: 2014.07.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2012
  • Latest release: Jan 29, 2016
  • Number of updates: 14
  • Update frequency: every 94.2 days
  • Top authors: dpchiesa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,628 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.63MB] [CPU: ▼51.73ms] Passed 4 tests

An overview of server-side resources used by StackOverflow Profile
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.1010.16 ▼33.35
Dashboard /wp-admin2.37 ▼0.9311.45 ▼44.39
Posts /wp-admin/edit.php2.37 ▼0.9812.36 ▼39.03
Add New Post /wp-admin/post-new.php2.37 ▼3.5112.03 ▼90.13
Media Library /wp-admin/upload.php2.37 ▼0.8614.49 ▼24.15

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_soprofile-widget

Browser metrics Passed 4 tests

A check of browser resources used by StackOverflow Profile
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.17 ▼0.101.78 ▼0.4141.46 ▼3.72
Dashboard /wp-admin2,195 ▲185.63 ▼0.0494.29 ▲1.9642.24 ▲1.50
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0347.99 ▲6.2934.80 ▼4.79
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.04668.29 ▼35.5954.87 ▼0.02
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.14111.16 ▼1.1546.67 ▼1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SOProfileWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_soprofile-widget
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/stackoverflow-profile-widget/soprofile.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: total in wp-content/plugins/stackoverflow-profile-widget/views/display.php on line 3
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/stackoverflow-profile-widget/views/display.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stackoverflow-profile-widget/views/display.php:47
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stackoverflow-profile-widget/views/form.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This shows the rendering of the Widget in the sidebar of a WP blog.), #2 (This shows how to activate the widget in the Plugins menu in the WP Admin backend), #3 (Configuring the settings for the stackoverflow widget in the WP Admin backend.)
The official readme.txt might help

stackoverflow-profile-widget/soprofile.php 92% from 13 tests

This is the main PHP file of "StackOverflow Profile" version 2014.07.03, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("stackoverflow-profile-widget.php" instead of "soprofile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin795 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5122146698
CSS15297

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.14
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods2765.85%
▷ Protected methods614.63%
▷ Private methods819.51%
Functions3
▷ Named functions3100.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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png29.16KB15.27KB▼ 47.65%
screenshot-2.png6.56KB4.74KB▼ 27.84%
screenshot-1.png19.17KB8.67KB▼ 54.78%