87% react-and-share

Code Review | React & Share - Customizable Reaction Buttons

WordPress plugin React & Share - Customizable Reaction Buttons scored 87% from 54 tests.

About plugin

  • Plugin page: react-and-share
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 5.8.1
  • First release: Apr 7, 2016
  • Latest release: Dec 10, 2020
  • Number of updates: 80
  • Update frequency: every 21.4 days
  • Top authors: dekkoteam (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

800+ active / 31,711 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼172.25ms] Passed 4 tests

Server-side resources used by React & Share - Customizable Reaction Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0329.73 ▼9.26
Dashboard /wp-admin3.23 ▲0.1848.65 ▲2.86
Posts /wp-admin/edit.php3.34 ▲0.2455.46 ▲7.85
Add New Post /wp-admin/post-new.php5.60 ▲0.16104.41 ▼688.70
Media Library /wp-admin/upload.php3.18 ▲0.1746.54 ▲6.10
React & Share /wp-admin/options-general.php?page=rns_options3.1235.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

React & Share - Customizable Reaction Buttons: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲25816.46 ▲1.1315.94 ▲5.5350.14 ▼7.93
Dashboard /wp-admin2,975 ▲415.87 ▼0.30150.12 ▼40.44118.78 ▼13.76
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0188.40 ▲10.6899.25 ▲3.50
Add New Post /wp-admin/post-new.php1,754 ▲7123.98 ▲5.51437.18 ▲14.72130.52 ▲13.89
Media Library /wp-admin/upload.php1,812 ▲55.01 ▲0.01169.86 ▼3.06125.69 ▲6.56
React & Share /wp-admin/options-general.php?page=rns_options1,3472.1062.5384.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=rns_options
    • > Notice in wp-content/plugins/react-and-share/rns.php+323
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=rns_options
    • > Notice in wp-content/plugins/react-and-share/rns.php+252
    Undefined index: api_key

SRP 50% 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/react-and-share/rns.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (20 tag instead of maximum 10)
  • Screenshots: Please add an image for screenshot #1 (Reaction buttons)
Please take inspiration from this readme.txt

react-and-share/rns.php 85% from 13 tests

This is the main PHP file of "React & Share - Customizable Reaction Buttons" version 3.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("react-and-share.php" instead of "rns.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,076 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity79.00
▷ Minimum class complexity79.00
▷ Maximum class complexity79.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 1.30MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/fb-icon.png1.45KB0.76KB▼ 47.70%
assets/screenshot-5.png106.50KB45.43KB▼ 57.34%
assets/icon-256x256.png25.63KB10.82KB▼ 57.79%
assets/screenshot-1.png348.52KB132.05KB▼ 62.11%