68% wp-activity-stream

Code Review | Activity Stream

WordPress plugin Activity Stream scored 68% from 54 tests.

About plugin

  • Plugin page: wp-activity-stream
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.8.1
  • First release: Feb 13, 2012
  • Latest release: Sep 10, 2014
  • Number of updates: 22
  • Update frequency: every 43.2 days
  • Top authors: dkukral (81.82%)Droyal (18.18%)jboydston (9.09%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,307 total downloads

Benchmarks

Plugin footprint 65% 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.05MB] [CPU: ▼139.86ms] Passed 4 tests

This is a short check of server-side resources used by Activity Stream
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0641.52 ▲7.49
Dashboard /wp-admin3.12 ▲0.0644.94 ▼1.68
Posts /wp-admin/edit.php3.17 ▲0.0647.02 ▲6.19
Add New Post /wp-admin/post-new.php5.47 ▲0.0495.90 ▼566.85
Media Library /wp-admin/upload.php3.06 ▲0.0638.06 ▲2.91
Activity Stream /wp-admin/index.php?page=activity-stream3.0126.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: 1 new table, 1 new option
New tables
wp_activity_stream
New WordPress options
astream_db_ver

Browser metrics Passed 4 tests

A check of browser resources used by Activity Stream
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.01 ▲0.468.82 ▲0.8656.27 ▲4.09
Dashboard /wp-admin2,975 ▲415.88 ▼0.13141.50 ▼18.38120.61 ▼1.56
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0075.54 ▲4.49101.00 ▲0.88
Add New Post /wp-admin/post-new.php1,651 ▼3218.19 ▼0.22375.04 ▼25.32119.38 ▼0.05
Media Library /wp-admin/upload.php1,812 ▲55.04 ▲0.04168.88 ▲24.90115.37 ▼16.54
Activity Stream /wp-admin/index.php?page=activity-stream1,0672.3356.3981.26

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
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_activity_stream
  • Zombie WordPress options detected upon uninstall: 1 option
    • astream_db_ver

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=activity-stream
    • > Notice in wp-content/plugins/wp-activity-stream/activity-stream.php+248
    Undefined index: ppage

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-activity-stream/activity-stream.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

wp-activity-stream/activity-stream.php 92% from 13 tests

The entry point to "Activity Stream" version 1.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-activity-stream.php" instead of "activity-stream.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected310 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17013282
CSS17026
JavaScript1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin