84% responsive-whatsapp-share-button

Code Review | Responsive Share Button

WordPress plugin Responsive Share Button scored 84% from 54 tests.

About plugin

  • Plugin page: responsive-whatsa...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2.3
  • WordPress version: 5.8.1
  • First release: Oct 15, 2015
  • Latest release: Oct 1, 2019
  • Number of updates: 10
  • Update frequency: every 144.7 days
  • Top authors: freewebmentor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,954 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
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼177.00ms] Passed 4 tests

Analyzing server-side resources used by Responsive Share Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0241.44 ▲3.89
Dashboard /wp-admin2.75 ▼0.3122.71 ▼29.69
Posts /wp-admin/edit.php2.75 ▼0.3623.18 ▼27.32
Add New Post /wp-admin/post-new.php2.75 ▼2.6922.09 ▼634.42
Media Library /wp-admin/upload.php2.75 ▼0.2621.89 ▼16.56
WhatsApp Share Button /wp-admin/options-general.php?page=fm-whatsApp-share2.7521.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Share Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲11415.95 ▲0.359.40 ▲0.2150.15 ▼0.92
Dashboard /wp-admin2,975 ▲415.88 ▼0.08151.32 ▼8.59110.06 ▼3.59
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0071.35 ▲2.3690.81 ▼0.23
Add New Post /wp-admin/post-new.php1,584 ▼9920.62 ▲2.23431.31 ▲11.79111.32 ▼3.19
Media Library /wp-admin/upload.php1,815 ▲675.03 ▲0.03156.25 ▲1.95121.31 ▲11.49
WhatsApp Share Button /wp-admin/options-general.php?page=fm-whatsApp-share1,1002.0959.6775.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/responsive-whatsapp-share-button/index.php+76
    Use of undefined constant rsb_SocialSharePlugin - assumed 'rsb_SocialSharePlugin' (this will throw an Error in a future version of PHP)

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=fm-whatsApp-share
    • > Warning in wp-content/plugins/responsive-whatsapp-share-button/index.php+76
    Use of undefined constant rsb_SocialSharePlugin - assumed 'rsb_SocialSharePlugin' (this will throw an Error in a future version of PHP)

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: website share, mobile seo, button, share, whatsapp...

responsive-whatsapp-share-button/index.php 92% from 13 tests

The main PHP file in "Responsive Share Button" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("responsive-whatsapp-share-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141976
CSS11125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
whatsapp.png0.49KB0.64KB0.00%