10% share-cluster

Code Review | Share Cluster

WordPress plugin Share Cluster scored10%from 54 tests.

About plugin

  • Plugin page: share-cluster
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 11, 2014
  • Latest release: Aug 6, 2014
  • Number of updates: 5
  • Update frequency: every 192.0 days
  • Top authors: dewolfe001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/share-cluster/index.php+25
    define(): Declaration of case-insensitive constants is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.77ms] Passed 4 tests

A check of server-side resources used by Share Cluster
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.69 ▼39.15
Dashboard /wp-admin2.12 ▼1.196.57 ▼47.07
Posts /wp-admin/edit.php2.12 ▼1.246.32 ▼42.91
Add New Post /wp-admin/post-new.php2.12 ▼3.776.22 ▼89.95
Media Library /wp-admin/upload.php2.12 ▼1.117.45 ▼28.72
Support /wp-admin/admin.php?page=cluster-support2.126.81
Share Cluster /wp-admin/admin.php?page=cluster-general2.126.63
All Posts /wp-admin/edit.php?post_type=sharead2.126.46
Documentation /wp-admin/admin.php?page=cluster-docs2.127.41
New Post /wp-admin/post-new.php?post_type=sharead2.126.61
License /wp-admin/admin.php?page=tdcsc_license_options2.125.91

Server storage [IO: ▲0.52MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: 2 new tables, 17 new options
New tables
wp_tdcsc_abuses
wp_tdcsc_sources
New WordPress options
tdcsc_wordpress_source
tdcsc_release_version
tdcsc_author
db_upgraded
widget_recent-comments
widget_tdcsc_widget_random
tdcsc_home_page
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Share Cluster
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.38 ▼0.391.90 ▼0.0242.03 ▼6.20
Dashboard /wp-admin2,252 ▲785.67 ▲0.0187.40 ▼10.2595.81 ▲55.27
Posts /wp-admin/edit.php2,157 ▲571.99 ▼0.0237.93 ▼2.7236.95 ▲5.97
Add New Post /wp-admin/post-new.php1,574 ▲3623.48 ▲5.12733.48 ▲45.1456.56 ▼17.16
Media Library /wp-admin/upload.php1,491 ▲914.31 ▲0.11105.89 ▼5.1372.20 ▲26.20
Support /wp-admin/admin.php?page=cluster-support7631.358.1734.75
Share Cluster /wp-admin/admin.php?page=cluster-general9491.6725.0746.58
All Posts /wp-admin/edit.php?post_type=sharead1,1301.9332.5230.95
Documentation /wp-admin/admin.php?page=cluster-docs2,32616.34503.8785.06
New Post /wp-admin/post-new.php?post_type=sharead2,3327.56186.42117.93
License /wp-admin/admin.php?page=tdcsc_license_options8692.0125.3233.27

Uninstaller [IO: ▲0.05MB] [DB: ▲0.01MB] 25% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/share-cluster/index.php+25
    define(): Declaration of case-insensitive constants is deprecated
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_tdcsc_abuses
    • wp_tdcsc_sources
  • The uninstall procedure has failed, leaving 17 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • tdcsc_wordpress_source
    • widget_tdcsc_widget_random
    • recovery_mode_email_last_sent
    • tdcsc_release_date
    • widget_recent-posts
    • widget_tdcsc_widget_one
    • tdcsc_lastcheck
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tdcsc_license_options
    • > Deprecated in wp-content/plugins/share-cluster/index.php+25
    define(): Declaration of case-insensitive constants is deprecated
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tdcsc_license_options
    • > Deprecated in wp-content/plugins/share-cluster/cluster-includes/widgets.php+220
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=cluster-support
    • > Parse error in wp-content/plugins/share-cluster/cluster-admin/support_tab.php+25
    syntax error, unexpected end of file
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cluster-general
    • > Notice in wp-content/plugins/share-cluster/cluster-admin/general_tab.php+92
    Undefined index: url
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sharead
    • > Notice in wp-content/plugins/share-cluster/cluster-includes/functions.php+442
    Undefined index: publickey
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cluster-general
    • > Notice in wp-content/plugins/share-cluster/cluster-admin/general_tab.php+93
    Undefined index: status
    • > GET request to /wp-admin/post-new.php?post_type=sharead
    • > Notice in wp-content/plugins/share-cluster/cluster-includes/functions.php+381
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=sharead
    • > Notice in wp-content/plugins/share-cluster/cluster-includes/functions.php+355
    Undefined offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=sharead
    • > Notice in wp-content/plugins/share-cluster/cluster-includes/functions.php+355
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/share-cluster/cluster-includes/widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-cluster/cluster-includes/functions.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tdcsc_source_list() in wp-content/plugins/share-cluster/cluster-admin/general_tab.php:18
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/share-cluster/cluster-admin/support_tab.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/share-cluster/index.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Share Cluster options for referencing remote sites, as well as the local install's URL and public key), #2 (What a Shared Post looks like), #3 (Adding the media to a Shared Post), #4 (What the Share Cluster widgets look like)
The official readme.txt is a good inspiration

share-cluster/index.php 85% from 13 tests

"Share Cluster" version 1.02's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 371 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("share-cluster.php" instead of "index.php")

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 detected1,381 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP83332831,381

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.50
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions67
▷ Named functions67100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon32.png53.31KB0.85KB▼ 98.40%