94% ostatus-for-wordpress

Code Review | OStatus

WordPress plugin OStatus scored 94% from 54 tests.

About plugin

  • Plugin page: ostatus-for-wordp...
  • Plugin version: 2.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.2
  • WordPress version: 5.8.1
  • First release: Jun 11, 2010
  • Latest release: Jul 26, 2019
  • Number of updates: 51
  • Update frequency: every 65.4 days
  • Top authors: pfefferle (88.24%)pepijndevos (13.73%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 3,870 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼181.37ms] 75% from 4 tests

A check of server-side resources used by OStatus
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 3,681.36ms on /wp-admin/admin.php?page=ostatus-dependencies)
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0734.21 ▲10.71
Dashboard /wp-admin3.13 ▲0.0734.44 ▼1.71
Posts /wp-admin/edit.php3.22 ▲0.1132.34 ▼8.64
Add New Post /wp-admin/post-new.php5.49 ▲0.0571.61 ▼714.32
Media Library /wp-admin/upload.php3.07 ▲0.0722.32 ▼0.81
OStatus /wp-admin/admin.php?page=ostatus3.0520.50
Dependencies /wp-admin/admin.php?page=ostatus-dependencies3.173,681.36

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by OStatus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲10015.57 ▼0.395.15 ▼1.1681.48 ▼8.21
Dashboard /wp-admin2,962 ▲676.00 ▼0.14117.50 ▼19.85192.32 ▲23.10
Posts /wp-admin/edit.php2,775 ▲353.12 ▼0.1166.98 ▲2.44150.54 ▲11.24
Add New Post /wp-admin/post-new.php3,764 ▲6519.19 ▲0.61465.97 ▼16.93201.96 ▲34.92
Media Library /wp-admin/upload.php1,787 ▲385.51 ▼0.02131.74 ▼5.42204.25 ▲18.26
OStatus /wp-admin/admin.php?page=ostatus1,2562.5154.28149.67
Dependencies /wp-admin/admin.php?page=ostatus-dependencies1,8712.6455.53121.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/ostatus-for-wordpress/trunk/templates/feed-ostatus-comments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/ostatus-for-wordpress/trunk/templates/feed-ostatus.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ostatus-for-wordpress/templates/dependencies-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/ostatus-for-wordpress/templates/feed-ostatus.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ostatus-for-wordpress/ostatus-for-wordpress.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ostatus-for-wordpress/trunk/templates/settings-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ostatus-for-wordpress/trunk/templates/dependencies-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ostatus-for-wordpress/templates/settings-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ostatus-for-wordpress/trunk/ostatus-for-wordpress.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/ostatus-for-wordpress/templates/feed-ostatus-comments.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: mastodon, social, ostatus, statusnet, gnusocial...

ostatus-for-wordpress/ostatus-for-wordpress.php Passed 13 tests

"OStatus" version 2.5.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
A bundle of plugins that turn your blog into your private federated social network.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected523 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP980151479
CSS10036
YAML1118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods28
▷ Static methods28100.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/ostatus_icon.png0.43KB0.32KB▼ 25.68%
trunk/static/ostatus_logo.png0.89KB1.00KB0.00%
static/ostatus_logo.png0.89KB1.00KB0.00%
trunk/static/ostatus_icon.png0.43KB0.32KB▼ 25.68%