10% addthis-all

Code Review | WordPress Website Tools Plugin – AddThis

WordPress plugin WordPress Website Tools Plugin – AddThis scored 10% from 54 tests.

About plugin

  • Plugin page: addthis-all
  • Plugin version: 3.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 5.9.2
  • First release: Dec 16, 2015
  • Latest release: Jul 10, 2019
  • Number of updates: 46
  • Update frequency: every 29.1 days
  • Top authors: addthisjhilts (45.65%)jgrodel (41.3%)kirk-at-addthis (13.04%)dtabor (4.35%)arnavarro (4.35%)

Code review

54 tests

User reviews

33 reviews

Install metrics

5,000+ active / 120,080 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/addthis-all/backend/AddThisPlugin.php+203
    Undefined index: cms_version

Server metrics [RAM: ▲1.18MB] [CPU: ▼284.19ms] Passed 4 tests

A check of server-side resources used by WordPress Website Tools Plugin – AddThis
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.1762.79 ▲6.91
Dashboard /wp-admin4.61 ▲1.2043.44 ▲10.27
Posts /wp-admin/edit.php4.83 ▲1.1947.37 ▲9.63
Add New Post /wp-admin/post-new.php8.13 ▲1.16102.81 ▼1,163.57
Media Library /wp-admin/upload.php4.55 ▲1.2636.96 ▲11.97
Advanced Settings /wp-admin/admin.php?page=addthis_advanced_settings4.4733.78
Home /wp-admin/admin.php?page=addthis_registration4.4730.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 321 new files
Database: no new tables, 5 new options
New WordPress options
addthis_recommended_content_settings
widget_addthis_global_options_widget
widget_addthis_tool_by_class_name_widget
addthis_follow_buttons_settings
addthis_shared_settings

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Website Tools Plugin – AddThis
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲13118.41 ▲2.7680.90 ▲74.393.02 ▲0.83
Dashboard /wp-admin2,911 ▲536.16 ▲0.01116.16 ▼28.64180.47 ▼36.83
Posts /wp-admin/edit.php2,725 ▲313.12 ▼0.1164.08 ▼3.68142.18 ▼0.33
Add New Post /wp-admin/post-new.php1,732 ▼2018.58 ▼3.05419.77 ▼15.89209.69 ▲30.78
Media Library /wp-admin/upload.php1,732 ▲345.63 ▲0.09125.85 ▼19.24211.02 ▼34.23
Advanced Settings /wp-admin/admin.php?page=addthis_advanced_settings7,77812.28424.46218.37
Home /wp-admin/admin.php?page=addthis_registration4,8818.36467.88185.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/addthis-all/backend/AddThisPlugin.php+237
    Undefined index: cms_version
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • addthis_follow_buttons_settings
    • widget_addthis_tool_by_class_name_widget
    • widget_addthis_global_options_widget
    • addthis_shared_settings
    • addthis_recommended_content_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 29× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/addthis-all/backend/AddThisGlobalOptionsWidget.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addthis-all/backend/AddThisAdminUtilities.php:63

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=addthis_registration
    • > Network (severe)
    https://www.addthis.com/darkseid/plugins/wpwt/v/3.2.6/site/ - Failed to load resource: the server responded with a status of 404 ()

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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in addthis-all/assets to your readme.txt
You can look at the official readme.txt

addthis-all/bootstrap.php 85% from 13 tests

"WordPress Website Tools Plugin – AddThis" version 3.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("addthis-all.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin27,666 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript879221,1958,754
PHP321,1593,3486,286
HTML1095351066,192
PO File27041,0312,671
CSS172802891,648
JSON4001,298
SVG8120392
Markdown31110352
XML28173

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity35.20
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods262
▷ Static methods4416.79%
▷ Public methods21883.21%
▷ Protected methods3212.21%
▷ Private methods124.58%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.49MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) frontend/src/images/tool-thumb-sharing-inline.png26.78KB0.00KB▼ 100.00%
frontend/src/images/tool-list-thumb-shfs.png1.70KB0.21KB▼ 87.57%
frontend/src/images/icon-shape-round.png1.00KB0.98KB▼ 1.47%
frontend/src/images/social-twitter.png18.42KB0.97KB▼ 94.73%
frontend/src/images/tool-example-wnm.png4.60KB2.75KB▼ 40.22%