84% wp-to-diaspora

Code Review | WP to diaspora

WordPress plugin WP to diaspora scored84%from 54 tests.

About plugin

  • Plugin page: wp-to-diaspora
  • Plugin version: 4.0.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Sep 29, 2023
  • Number of updates: 91
  • Update frequency: every 35.1 days
  • Top authors: gutobenn (67.03%)noplanman (34.07%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /6,608 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.00MB] [CPU: ▼3.70ms] Passed 4 tests

A check of server-side resources used by WP to diaspora
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.56 ▲2.68
Dashboard /wp-admin3.31 ▲0.0045.33 ▼1.18
Posts /wp-admin/edit.php3.36 ▲0.0043.28 ▲0.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.28 ▼15.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.04 ▲0.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 163 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP to diaspora
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.80 ▲0.421.84 ▲0.1243.31 ▲4.95
Dashboard /wp-admin2,206 ▲175.05 ▲0.14114.40 ▲11.3642.11 ▲0.07
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0235.81 ▲2.1632.41 ▼0.61
Add New Post /wp-admin/post-new.php1,533 ▲1023.19 ▼0.23663.47 ▲28.4951.56 ▼4.54
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.05100.52 ▲2.1144.69 ▼0.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 75× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Psr7/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Psr7/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/League/HTMLToMarkdown/Converter/TableConverter.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/League/HTMLToMarkdown/Converter/CommentConverter.php:11
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16. in wp-content/plugins/wp-to-diaspora/vendor/composer/platform_check.php on line 24
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Promise/Coroutine.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP2D\\Dependencies\\GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Promise/CancellationException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/League/HTMLToMarkdown/Converter/DivConverter.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WP2D\\Dependencies\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Psr7/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP2D\\Dependencies\\GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/wp-to-diaspora/lib/Dependencies/GuzzleHttp/Exception/BadResponseException.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: share, post, social, integration, diaspora...

wp-to-diaspora/wp-to-diaspora.php Passed 13 tests

This is the main PHP file of "WP to diaspora" version 4.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Automatically shares WordPress posts on diaspora*

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
Success! There were no dangerous files found in this plugin13,212 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1502,9157,02812,849
JavaScript33829221
CSS33314137
JSON1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.66
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces13
Interfaces31
Traits3
Classes106
▷ Abstract classes00.00%
▷ Concrete classes106100.00%
▷ Final classes3734.91%
Methods987
▷ Static methods15916.11%
▷ Public methods81582.57%
▷ Protected methods70.71%
▷ Private methods16516.72%
Functions103
▷ Named functions109.71%
▷ Anonymous functions9390.29%
Constants80
▷ Global constants1316.25%
▷ Class constants6783.75%
▷ Public constants5683.58%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/chosen-sprite.png0.53KB0.88KB0.00%
css/chosen-sprite@2x.png0.72KB0.83KB0.00%