72% wpsite-content-resharer

Code Review | Content Resharer

WordPress plugin Content Resharer scored72%from 54 tests.

About plugin

  • Plugin page: wpsite-content-re...
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2014
  • Latest release: Sep 14, 2020
  • Number of updates: 51
  • Update frequency: every 43.2 days
  • Top authors: 99robots (64.71%)wpsitenet (31.37%)kjbenk (7.84%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /8,954 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.01ms] Passed 4 tests

Server-side resources used by Content Resharer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.06 ▲1.19
Dashboard /wp-admin3.34 ▲0.0445.99 ▼2.63
Posts /wp-admin/edit.php3.45 ▲0.1045.12 ▲1.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0477.37 ▼15.20
Media Library /wp-admin/upload.php3.26 ▲0.0433.36 ▲0.78
Help /wp-admin/admin.php?page=wpsite-content-resharer-help3.3131.14
Accounts /wp-admin/admin.php?page=wpsite-content-resharer-dashboard3.5036.80
Exclude Posts /wp-admin/admin.php?page=wpsite-content-resharer-exclude-posts3.2935.55
Messages /wp-admin/admin.php?page=wpsite-content-resharer-messages3.2830.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Content Resharer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.39 ▼1.001.74 ▼0.2740.08 ▼4.49
Dashboard /wp-admin2,249 ▲615.84 ▼0.0997.50 ▼16.0671.50 ▲29.61
Posts /wp-admin/edit.php2,129 ▲401.99 ▼0.0535.36 ▼0.9632.78 ▼1.30
Add New Post /wp-admin/post-new.php6,250 ▲4,71718.92 ▼4.50965.68 ▲291.2167.42 ▲14.22
Media Library /wp-admin/upload.php1,427 ▲364.22 ▼0.0294.87 ▼4.6163.60 ▲18.35
Help /wp-admin/admin.php?page=wpsite-content-resharer-help1,2912.3641.1074.50
Accounts /wp-admin/admin.php?page=wpsite-content-resharer-dashboard1,2612.6246.1541.06
Exclude Posts /wp-admin/admin.php?page=wpsite-content-resharer-exclude-posts1,1602.4835.0636.45
Messages /wp-admin/admin.php?page=wpsite-content-resharer-messages1,2362.4935.9938.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpsite-content-resharer/admin/footer.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsite-content-resharer/admin/header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpsite-content-resharer/admin/sidebar.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Resharer_Base' not found in wp-content/plugins/wpsite-content-resharer/include/class-resharer-twitter-metabox.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsite-content-resharer/admin/header.php:7
    • > PHP Warning
      Use of undefined constant WPSITE_TWITTER_RESHARE_PLUGIN_DIR - assumed 'WPSITE_TWITTER_RESHARE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpsite-content-resharer/include/connect-accounts/connect-twitter.php on line 2
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wpsite-content-resharer/include/reshare-accounts/reshare-twitter.php:2
    • > PHP Warning
      Use of undefined constant WPSITE_TWITTER_RESHARE_PLUGIN_DIR - assumed 'WPSITE_TWITTER_RESHARE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpsite-content-resharer/include/reshare-accounts/reshare-twitter.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'WPSITE_TWITTER_RESHARE_PLUGIN_DIR/include/api_src/twitteroauth/twitteroauth.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpsite-content-resharer/include/connect-accounts/connect-twitter.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsite-content-resharer/admin/header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpsite-content-resharer/admin/messages_add_edit.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpsite-content-resharer-messages
    • > Network (severe)
    wp-content/plugins/wpsite-content-resharer/img/logo.png%20style=width:20px;padding-top:%206px; - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpsite-content-resharer-messages
    • > Network (severe)
    http://feeds.feedburner.com/99robots?format=sigpro - Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE.NotSameSite

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Tags: Too many tags (41 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

wpsite-content-resharer/wpsite-content-resharer.php 85% from 13 tests

The main PHP file in "Content Resharer" ver. 2.3.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected5,113 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP208031,0192,979
SVG200928
CSS410527517
PO File1133145504
JavaScript44554185

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.82
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes00.00%
Methods138
▷ Static methods2115.22%
▷ Public methods10676.81%
▷ Protected methods1611.59%
▷ Private methods1611.59%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
15 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/rainbow-strip-hz-wide.png3.24KB0.57KB▼ 82.36%
img/remove_account.png2.85KB0.28KB▼ 90.35%
img/marker.png0.64KB0.71KB0.00%
img/ad-plugin-request.png14.13KB5.42KB▼ 61.62%
img/logo-only-80h.png18.26KB4.36KB▼ 76.14%