62% share-on-diaspora

Code Review | Share on Diaspora

WordPress plugin Share on Diaspora scored62%from 54 tests.

About plugin

  • Plugin page: share-on-diaspora
  • Plugin version: 0.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.7.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Apr 25, 2021
  • Number of updates: 86
  • Update frequency: every 32.5 days
  • Top authors: Vitalie Ciubotaru (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,567 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼6.27MB] [CPU: ▼1,120,059.99ms] Passed 4 tests

An overview of server-side resources used by Share on Diaspora
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0342.27 ▲1.90
Dashboard /wp-admin3.29 ▼22.3536.82 ▼4,480,137.99
Posts /wp-admin/edit.php3.30 ▼0.1129.70 ▼24.31
Add New Post /wp-admin/post-new.php3.30 ▼2.6431.85 ▼68.88
Media Library /wp-admin/upload.php3.30 ▲0.0229.87 ▼8.76
Share on D* /wp-admin/options-general.php?page=share_on_diaspora_options_page3.3030.40

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
share-on-diaspora-settings
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Share on Diaspora: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.24 ▼0.111.74 ▲0.0645.99 ▼2.60
Dashboard /wp-admin2,200 ▲235.52 ▼0.0389.55 ▼18.1038.31 ▼6.89
Posts /wp-admin/edit.php2,111 ▲111.99 ▲0.0138.79 ▲2.0334.45 ▼2.81
Add New Post /wp-admin/post-new.php1,533 ▲723.09 ▲0.05633.95 ▼21.1551.40 ▲1.44
Media Library /wp-admin/upload.php1,408 ▲54.20 ▼0.01104.72 ▲5.9546.54 ▲1.52
Share on D* /wp-admin/options-general.php?page=share_on_diaspora_options_page9092.0124.8933.82

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/share-on-diaspora/admin.php+150
    Undefined index: podlist
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/admin.php+150
    Undefined index: podlist
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Warning in wp-content/plugins/share-on-diaspora/admin.php+162
    Invalid argument supplied for foreach()
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+11
    Undefined index: button_size
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/admin.php+196
    Undefined index: button_text
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+6
    Undefined index: button_color
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+7
    Undefined index: button_background
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+8
    Undefined index: button_color_hover
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+9
    Undefined index: button_background_hover
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > Notice in wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php+19
    Undefined index: button_rounded
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=share_on_diaspora_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/share-on-diaspora/share-on-diaspora-css.php
    • > /wp-content/plugins/share-on-diaspora/new_window.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ShareOnDiaspora' not found in wp-content/plugins/share-on-diaspora/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/share-on-diaspora/share-on-diaspora.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === share-on-diaspora === )
The official readme.txt is a good inspiration

share-on-diaspora/share-on-diaspora.php Passed 13 tests

The main PHP script in "Share on Diaspora" version 0.7.9 is automatically included on every request by WordPress
68 characters long description:
This plugin adds a "Share on D*" button at the bottom of your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin996 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP792105980
JavaScript11016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity52.50
▷ Minimum class complexity15.00
▷ Maximum class complexity90.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods716.67%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/asterisk-30.png1.63KB1.43KB▼ 12.68%
images/asterisk-45.png2.43KB2.25KB▼ 7.44%
images/asterisk-25.png1.28KB1.10KB▼ 14.19%
images/asterisk-20.png0.94KB0.85KB▼ 9.44%