74% stack-overflow-activity-feed-widget

Code Review | Stack Overflow Activity Feed Widget

WordPress plugin Stack Overflow Activity Feed Widget scored74%from 54 tests.

About plugin

  • Plugin page: stack-overflow-ac...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-3.5
  • WordPress version: 6.3.1
  • First release: Apr 14, 2013
  • Latest release: Apr 14, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: arjunabhynav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /756 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.69MB] [CPU: ▼49.59ms] Passed 4 tests

This is a short check of server-side resources used by Stack Overflow Activity Feed Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.1714.12 ▼28.00
Dashboard /wp-admin2.31 ▼0.9911.43 ▼41.66
Posts /wp-admin/edit.php2.31 ▼1.059.45 ▼38.42
Add New Post /wp-admin/post-new.php2.31 ▼3.5811.51 ▼90.29
Media Library /wp-admin/upload.php2.31 ▼0.9211.08 ▼24.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_stackoverflowactivitywidget
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Stack Overflow Activity Feed Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.281.88 ▼0.0044.05 ▲2.91
Dashboard /wp-admin2,198 ▲185.66 ▼0.0488.63 ▼1.3240.50 ▼4.04
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0334.40 ▼2.9334.54 ▲0.26
Add New Post /wp-admin/post-new.php1,531 ▼2423.26 ▲4.90673.99 ▲20.1963.07 ▲9.84
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.2499.19 ▼8.4448.71 ▲1.36

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in StackOverflowActivityWidget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_stackoverflowactivitywidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/feed.php' (include_path='.:/usr/share/php') in wp-content/plugins/stack-overflow-activity-feed-widget/stack-overflow-activity-feed.php on line 28
    • > PHP Warning
      require_once(ABSPATHWPINC/feed.php): failed to open stream: No such file or directory in wp-content/plugins/stack-overflow-activity-feed-widget/stack-overflow-activity-feed.php on line 28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/stack-overflow-activity-feed-widget/stack-overflow-activity-feed.php on line 28
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/stack-overflow-activity-feed-widget/stack-overflow-activity-feed.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: widget, stack overflow widget, stack overflow activity, activity feed, stack overflow feed...

stack-overflow-activity-feed-widget/stack-overflow-activity-feed.php 92% from 13 tests

The main PHP script in "Stack Overflow Activity Feed Widget" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("stack-overflow-activity-feed-widget.php" instead of "stack-overflow-activity-feed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13746113

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin