93% viral-follow-buttons-by-up

Code Review | Viral Follow Buttons by UP

WordPress plugin Viral Follow Buttons by UP scored 93% from 54 tests.

About plugin

  • Plugin page: viral-follow-butt...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 5.8.1
  • First release: Jun 5, 2015
  • Latest release: Feb 6, 2016
  • Number of updates: 13
  • Update frequency: every 18.9 days
  • Top authors: upshare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,891 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼131.27ms] Passed 4 tests

A check of server-side resources used by Viral Follow Buttons by UP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0645.90 ▲8.74
Dashboard /wp-admin3.19 ▲0.1387.09 ▲37.69
Posts /wp-admin/edit.php3.24 ▲0.1355.47 ▲10.36
Add New Post /wp-admin/post-new.php5.48 ▲0.05101.45 ▼554.35
Media Library /wp-admin/upload.php3.07 ▲0.0745.92 ▲10.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 2 new options
New WordPress options
upshare_notice
partner_id

Browser metrics Passed 4 tests

A check of browser resources used by Viral Follow Buttons by UP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲17516.19 ▲0.298.36 ▼0.0350.23 ▼4.19
Dashboard /wp-admin3,000 ▲665.94 ▼0.20196.47 ▲40.45172.51 ▲61.91
Posts /wp-admin/edit.php2,765 ▲262.72 ▲0.0478.13 ▲8.38102.94 ▲5.05
Add New Post /wp-admin/post-new.php1,610 ▼7317.23 ▼1.19395.03 ▼7.01117.24 ▲1.97
Media Library /wp-admin/upload.php1,791 ▼165.04 ▼0.02144.41 ▼18.27157.30 ▲29.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/viral-follow-buttons-by-up/html/admin/settings.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/viral-follow-buttons-by-up/upshare.php:24
    • > PHP Notice
      Undefined variable: partner_id in wp-content/plugins/viral-follow-buttons-by-up/html/admin/settings.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: A description for screenshot #2 is missing in viral-follow-buttons-by-up/assets to your readme.txt
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

viral-follow-buttons-by-up/upshare.php 92% from 13 tests

The entry point to "Viral Follow Buttons by UP" version 1.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("viral-follow-buttons-by-up.php" instead of "upshare.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
No dangerous file extensions were detected991 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS21309559
PHP28931425
JavaScript2457

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 1.18MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/btn-clickhere.png1.82KB0.91KB▼ 50.11%
images/menu-icon.png1.35KB0.61KB▼ 54.86%
images/partner-metrics-slider-3.png127.98KB38.61KB▼ 69.83%
images/border-img.png1.21KB1.14KB▼ 6.13%
images/partner-slider-2.png191.33KB54.05KB▼ 71.75%