68% sharethis-reviews

Code Review | ShareThis Reviews

WordPress plugin ShareThis Reviews scored68%from 54 tests.

About plugin

  • Plugin page: sharethis-reviews
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 24, 2018
  • Latest release: Oct 20, 2022
  • Number of updates: 19
  • Update frequency: every 76.7 days
  • Top authors: ShareThis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,506 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.18MB] [CPU: ▼10.57ms] Passed 4 tests

An overview of server-side resources used by ShareThis Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.65 ▲5.80
Dashboard /wp-admin3.39 ▲0.0945.69 ▼3.88
Posts /wp-admin/edit.php3.44 ▲0.0844.97 ▼4.37
Add New Post /wp-admin/post-new.php4.92 ▼0.9756.44 ▼36.84
Media Library /wp-admin/upload.php3.31 ▲0.0837.92 ▲2.80
Settings /wp-admin/admin.php?page=sharethisreviews-general3.3136.70
Review Management /wp-admin/admin.php?page=sharethisreviews-reviews3.3429.96

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
can_compress_scripts
sharethis_property_id
sharethisreviews_rating_section_symbols
sharethisreviews_rating_section_posttype
sharethisreviews_review_section_posttype
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for ShareThis Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲24914.10 ▼0.2518.73 ▲17.1240.92 ▲2.87
Dashboard /wp-admin2,291 ▲1135.87 ▲0.2985.70 ▼15.2637.41 ▼8.58
Posts /wp-admin/edit.php2,206 ▲1092.51 ▲0.5639.03 ▲1.3529.54 ▼4.79
Add New Post /wp-admin/post-new.php6,269 ▲4,74326.13 ▲2.53939.66 ▲241.2437.60 ▼16.07
Media Library /wp-admin/upload.php1,491 ▲944.44 ▲0.2297.43 ▼3.2643.57 ▲0.82
Settings /wp-admin/admin.php?page=sharethisreviews-general1,4572.6043.9464.62
Review Management /wp-admin/admin.php?page=sharethisreviews-reviews9272.0927.8827.60

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ShareThisReviews\Register' does not have a method 'st_deactivation_hook'
  • Zombie WordPress options detected upon uninstall: 11 options
    • can_compress_scripts
    • sharethisreviews_rating_section_symbols
    • widget_recent-posts
    • sharethis_property_id
    • sharethisreviews_review_section_posttype
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • sharethisreviews_impression_section_symbols
    • db_upgraded
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/sharethis-reviews/assets/crying-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/4-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/thumbs-up-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/thumbs-down-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/happy-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/sad-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/strike-heart-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/5-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/inlove-icon.svg.php
    • > /wp-content/plugins/sharethis-reviews/assets/star-icon.svg.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sharethis-reviews/templates/menu/radio-field.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/sharethis-reviews/templates/menu/multi-check.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sharethis-reviews/templates/menu/text-field.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sharethis-reviews/templates/rating-metabox.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sharethis-reviews/templates/menu/check-field.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShareThisReviews\\trailingslashit() in wp-content/plugins/sharethis-reviews/php/class-plugin-base.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShareThisReviews\\trailingslashit() in wp-content/plugins/sharethis-reviews/php/class-plugin-base.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/sharethis-reviews/templates/menu/menu-template.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ShareThisReviews\\Plugin_Base' not found in wp-content/plugins/sharethis-reviews/php/class-plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sharethis-reviews/templates/menu/color-picker.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: sharethis, thoughts, impression, share this, ranking...

sharethis-reviews/sharethis-reviews.php 92% from 13 tests

The main PHP file in "ShareThis Reviews" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,529 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP293066031,671
CSS2967500
JavaScript365112328
JSON10030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity63.00
▷ Minimum class complexity9.00
▷ Maximum class complexity121.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods5686.15%
▷ Protected methods11.54%
▷ Private methods812.31%
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
No PNG files were detected