84% wp-togetherjs

Code Review | WP TogetherJS

WordPress plugin WP TogetherJS scored84%from 54 tests.

About plugin

  • Plugin page: wp-togetherjs
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Sep 30, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: RyanNielson (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.45ms] Passed 4 tests

An overview of server-side resources used by WP TogetherJS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.86 ▼3.51
Dashboard /wp-admin3.32 ▼0.0342.90 ▼21.64
Posts /wp-admin/edit.php3.37 ▲0.0145.05 ▼1.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.33 ▼7.55
Media Library /wp-admin/upload.php3.24 ▲0.0134.67 ▼1.10

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

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

Browser metrics Passed 4 tests

WP TogetherJS: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.42 ▼0.518.00 ▲6.4040.01 ▼1.36
Dashboard /wp-admin2,213 ▲365.67 ▲0.0890.63 ▲0.4144.02 ▼2.31
Posts /wp-admin/edit.php2,121 ▲211.99 ▼0.1639.87 ▲4.5235.52 ▼0.74
Add New Post /wp-admin/post-new.php1,538 ▲1223.20 ▲0.01619.36 ▼56.2451.62 ▼12.44
Media Library /wp-admin/upload.php1,418 ▲184.20 ▼0.0296.87 ▼20.6342.37 ▼5.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 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 add_action() in wp-content/plugins/wp-togetherjs/wp-togetherjs.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The admin toolbar after activating WP TogetherJS.), #2 (TogetherJS in action aftering pressing the "Start TogetherJS" button.)
Please take inspiration from this readme.txt

wp-togetherjs/wp-togetherjs.php Passed 13 tests

The main PHP script in "WP TogetherJS" version 1.0.1 is automatically included on every request by WordPress
81 characters long description:
Easily integrate Mozilla's TogetherJS collaboration system into a Wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected48 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP151420
CSS16016
JavaScript10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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
2 PNG files occupy 0.23MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png94.93KB26.25KB▼ 72.35%
screenshot-2.png136.80KB36.07KB▼ 73.63%