79% viral-hover-buttons

Code Review | Viral Hover Buttons

WordPress plugin Viral Hover Buttons scored79%from 54 tests.

About plugin

  • Plugin page: viral-hover-buttons
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Feb 7, 2015
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: smartynetwork (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,427 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.05MB] [CPU: ▼5.73ms] Passed 4 tests

A check of server-side resources used by Viral Hover Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.25 ▼6.35
Dashboard /wp-admin3.37 ▲0.0748.61 ▲1.38
Posts /wp-admin/edit.php3.42 ▲0.0645.44 ▼3.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.43 ▼11.54
Media Library /wp-admin/upload.php3.30 ▲0.0637.59 ▼1.69
Viral Hover Buttons /wp-admin/options-general.php?page=viral_hover_buttons_options3.2432.03

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
viral_hover_buttons_options
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Viral Hover Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.96 ▼0.426.05 ▲4.2542.50 ▲4.24
Dashboard /wp-admin2,214 ▲234.87 ▼1.03102.74 ▼4.3343.36 ▼0.10
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0036.05 ▼3.5131.91 ▼1.38
Add New Post /wp-admin/post-new.php1,524 ▲523.24 ▲0.14676.73 ▼20.7659.50 ▲4.61
Media Library /wp-admin/upload.php1,399 ▲84.20 ▲0.0599.98 ▲4.8640.89 ▼7.29
Viral Hover Buttons /wp-admin/options-general.php?page=viral_hover_buttons_options9561.8429.0326.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • viral_hover_buttons_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > Deprecated in wp-content/plugins/viral-hover-buttons/viral-hover-buttons-options.php+104
    array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > Notice in wp-content/plugins/viral-hover-buttons/viral-hover-buttons-options.php+188
    Undefined property: VIRAL_HOVER_BUTTONS_OPTIONS_PAGE_class::$options
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > Notice in wp-content/plugins/viral-hover-buttons/viral-hover-buttons-options.php+187
    Trying to get property 'template' of non-object
    • > GET request to /wp-admin/options-general.php?page=viral_hover_buttons_options
    • > Notice in wp-content/plugins/viral-hover-buttons/viral-hover-buttons-options.php+188
    Trying to get property 'plugin_version' of non-object

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/viral-hover-buttons/viral-hover-buttons.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viral-hover-buttons/viral-hover-buttons-options.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: share buttons, videos, pictures

viral-hover-buttons/viral-hover-buttons.php Passed 13 tests

The principal PHP file in "Viral Hover Buttons" v. 1.0 is loaded by WordPress automatically on each request
80 characters long description:
Adding overlay social share buttons on videos and images, making sharing easier.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin381 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28661246
CSS12723127
JavaScript1108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity7.40
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/gp_icon.png1.85KB0.92KB▼ 50.24%
img/hand_icon.png1.49KB0.28KB▼ 81.11%
img/tw_icon.png1.81KB0.94KB▼ 47.81%
img/fb_icon.png1.02KB0.12KB▼ 87.88%
img/pin_icon.png1.53KB0.71KB▼ 53.29%