73% share-decentral

Code Review | Share Decentral

WordPress plugin Share Decentral scored73%from 54 tests.

About plugin

  • Plugin page: share-decentral
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Apr 14, 2014
  • Number of updates: 9
  • Update frequency: every 2.2 days
  • Top authors: NodeCode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /922 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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼56.43ms] Passed 4 tests

Analyzing server-side resources used by Share Decentral
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.55 ▼38.13
Dashboard /wp-admin2.09 ▼1.266.60 ▼56.17
Posts /wp-admin/edit.php2.09 ▼1.276.69 ▼41.53
Add New Post /wp-admin/post-new.php2.09 ▼3.807.35 ▼89.88
Media Library /wp-admin/upload.php2.09 ▼1.147.01 ▼28.60

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Share Decentral
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.23 ▼1.121.60 ▼0.4138.61 ▼4.43
Dashboard /wp-admin2,211 ▲295.88 ▲0.8394.15 ▼21.4238.90 ▼5.93
Posts /wp-admin/edit.php2,091 ▲22.04 ▼0.0133.49 ▼5.9931.54 ▼4.49
Add New Post /wp-admin/post-new.php1,530 ▲1623.24 ▲5.56628.01 ▼41.4250.08 ▲7.21
Media Library /wp-admin/upload.php1,390 ▲24.20 ▲0.0396.26 ▼1.4541.14 ▼3.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the share-decentral handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/share-decentral/share-decentral.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Screenshot) image required
The official readme.txt might help

share-decentral/share-decentral.php 92% from 13 tests

The primary PHP file in "Share Decentral" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 182 characters long)

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
There were no executable files found in this plugin492 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1314428
PHP1144641
PO File12223

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
assets/screenshot-1.png2.32KB2.00KB▼ 13.56%
screenshot-1.png2.32KB2.00KB▼ 13.56%