72% uptolike-share

Code Review | Uptolike Social Share Buttons

WordPress plugin Uptolike Social Share Buttons scored72%from 54 tests.

About plugin

  • Plugin page: uptolike-share
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 4, 2014
  • Latest release: May 12, 2017
  • Number of updates: 115
  • Update frequency: every 9.1 days
  • Top authors: na1vez (100%)

Code review

54 tests

User reviews

89 reviews

Install metrics

7,000+ active /181,166 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.13MB] [CPU: ▼16.16ms] Passed 4 tests

Analyzing server-side resources used by Uptolike Social Share Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1631.60 ▼8.23
Dashboard /wp-admin3.51 ▲0.2045.23 ▼1.50
Posts /wp-admin/edit.php3.62 ▲0.2645.39 ▼1.16
Add New Post /wp-admin/post-new.php4.80 ▼1.0940.30 ▼53.75
Media Library /wp-admin/upload.php3.43 ▲0.2035.53 ▲3.99
UpToLike /wp-admin/options-general.php?page=uptolike_settings3.4231.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_uptolike_widget
uptolike_options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Uptolike Social Share Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.27 ▼1.051.82 ▲0.1339.93 ▼5.06
Dashboard /wp-admin2,233 ▲485.85 ▲1.0198.84 ▼18.7672.45 ▲27.64
Posts /wp-admin/edit.php2,115 ▲231.99 ▼0.0135.57 ▼5.5935.01 ▼2.26
Add New Post /wp-admin/post-new.php1,545 ▲1223.14 ▲0.10778.14 ▲95.6954.15 ▼14.66
Media Library /wp-admin/upload.php1,409 ▲214.24 ▲0.0695.48 ▼0.7376.29 ▲35.16
UpToLike /wp-admin/options-general.php?page=uptolike_settings2,9087.45172.6590.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • uptolike_options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_uptolike_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=uptolike_settings
    • > Notice in wp-content/plugins/uptolike-share/widget_options.php+523
    Undefined index: uptolike_json
    • > GET request to /wp-admin/options-general.php?page=uptolike_settings
    • > Notice in wp-content/plugins/uptolike-share/widget_options.php+523
    Trying to get property 'orientation' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uptolike-share/widget_options.php:703
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uptolike-share/widget_options.php:703

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=uptolike_settings
    • > Network (severe)
    https://uptolike.com/api/statistics.html?mail=contact%40potrivit.com&partner=cms&projectId=cmswpcom&signature=c5701b7df4ed2e0e0885e55ae4b0f15f - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

uptolike-share/uptolike_share_widget.php 85% from 13 tests

The main PHP script in "Uptolike Social Share Buttons" version 1.5.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "4.1")
  • Main file name: The principal plugin file should be the same as the plugin slug ("uptolike-share.php" instead of "uptolike_share_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,160 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP210954858
JavaScript11245165
CSS1270137

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity30.50
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.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

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.82MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/quest.png0.87KB0.65KB▼ 25.25%
screenshot-1.png448.62KB159.48KB▼ 64.45%
screenshot-2.png44.38KB15.79KB▼ 64.41%
screenshot-3.png343.79KB152.39KB▼ 55.67%
images/logo-small.png0.56KB0.67KB0.00%