84% add-to-any

Code Review | AddToAny Share Buttons

WordPress plugin AddToAny Share Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: add-to-any
  • Plugin version: 1.8.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 5.9.2
  • First release: Mar 17, 2007
  • Latest release: Jan 25, 2022
  • Number of updates: 726
  • Update frequency: every 7.5 days
  • Top authors: micropat (100%)

Code review

54 tests

User reviews

1005 reviews

Install metrics

500,000+ active / 14,945,578 total downloads


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.48MB] [CPU: ▼293.99ms] Passed 4 tests

Server-side resources used by AddToAny Share Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4156.01 ▲2.86
Dashboard /wp-admin3.96 ▲0.5536.90 ▲1.37
Posts /wp-admin/edit.php4.19 ▲0.5441.43 ▲2.72
Add New Post /wp-admin/post-new.php7.42 ▲0.4597.68 ▼1,182.90
Media Library /wp-admin/upload.php3.84 ▲0.5428.14 ▲4.23
AddToAny /wp-admin/options-general.php?page=addtoany3.8328.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 183 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AddToAny Share Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,994 ▲24016.89 ▲1.1816.23 ▲10.242.63 ▼0.04
Dashboard /wp-admin2,959 ▲1086.26 ▲0.08122.89 ▼12.95156.06 ▼6.21
Posts /wp-admin/edit.php2,755 ▲643.31 ▲0.0872.17 ▲7.79144.48 ▲3.95
Add New Post /wp-admin/post-new.php1,831 ▲16323.95 ▲5.46390.85 ▲5.65180.46 ▲25.72
Media Library /wp-admin/upload.php1,765 ▲675.63 ▲0.09158.24 ▲16.63203.72 ▲16.93
AddToAny /wp-admin/options-general.php?page=addtoany4,2336.72163.71232.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • widget_a2a_share_save_widget
    • widget_a2a_follow_widget

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-to-any/addtoany.admin.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-to-any/addtoany.compat.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/add-to-any/add-to-any.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add-to-any/addtoany.widgets.php:12

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


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
The official readme.txt might help

add-to-any/add-to-any.php Passed 13 tests

The primary PHP file in "AddToAny Share Buttons" version 1.8.4 is used by WordPress to initiate all plugin functionality
139 characters long description:
Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, LinkedIn, Pinterest, WhatsApp and many more.

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
Success! There were no dangerous files found in this plugin7,729 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PO File211,7532,4644,787

PHP code Passed 2 tests

An overview 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.78
Average class complexity12.50
▷ Minimum class complexity7.00
▷ Maximum class complexity18.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
▷ Named functions4896.00%
▷ Anonymous functions24.00%
▷ Global constants00.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings