77% react-and-share

Code Review | React & Share - Customizable Reaction Buttons

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

About plugin

  • Plugin page: react-and-share
  • Plugin version: 3.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Jan 13, 2023
  • Number of updates: 82
  • Update frequency: every 30.2 days
  • Top authors: dekkoteam (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /43,963 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.62ms] 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 /3.60 ▲0.1324.20 ▼14.65
Dashboard /wp-admin3.48 ▲0.1845.41 ▲2.04
Posts /wp-admin/edit.php3.60 ▲0.2447.10 ▲3.21
Add New Post /wp-admin/post-new.php6.07 ▲0.1885.72 ▼9.06
Media Library /wp-admin/upload.php3.41 ▲0.1736.46 ▲4.06
React & Share /wp-admin/options-general.php?page=rns_options3.3528.29

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, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

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 /2,914 ▲15313.50 ▼0.6912.95 ▲11.1835.92 ▼4.56
Dashboard /wp-admin2,202 ▲215.62 ▼0.0583.07 ▼15.1139.09 ▼1.13
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0133.79 ▼1.1835.88 ▲5.02
Add New Post /wp-admin/post-new.php6,233 ▲4,70725.98 ▲2.83874.36 ▲183.5952.14 ▼22.78
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.1198.35 ▼1.8944.04 ▼3.13
React & Share /wp-admin/options-general.php?page=rns_options1,0161.6823.9227.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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

Optimizations

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:
  • Screenshots: Please add an image for screenshot #1 (Reaction buttons)
  • Tags: There are too many tags (20 tag instead of maximum 10)
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.1, 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:
  • 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")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

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
PHP111313520
JavaScript3525282
CSS1320252
SVG10022

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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png348.52KB132.05KB▼ 62.11%
assets/icon-128x128.png12.24KB5.35KB▼ 56.24%
assets/img/happy.png1.15KB1.20KB0.00%
assets/img/pinterest-icon.png2.56KB1.97KB▼ 23.11%
assets/banner-772x250.png75.68KB29.69KB▼ 60.76%