10% raadso-like-button

Code Review | Raadso Like Button

WordPress plugin Raadso Like Button scored 10% from 54 tests.

About plugin

  • Plugin page: raadso-like-button
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: Jun 4, 2013
  • Latest release: Jun 5, 2013
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: omarteacher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,634 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/raadso-like-button/raadso-like-button.php+404
    Methods with the same name as their class will not be constructors in a future version of PHP; rd_like_widget has a deprecated constructor

Server metrics [RAM: ▼2.28MB] [CPU: ▼346.84ms] Passed 4 tests

This is a short check of server-side resources used by Raadso Like Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.424.52 ▼47.68
Dashboard /wp-admin2.11 ▼1.304.30 ▼31.17
Posts /wp-admin/edit.php2.12 ▼1.535.85 ▼32.18
Add New Post /wp-admin/post-new.php2.11 ▼4.864.43 ▼1,276.33
Media Library /wp-admin/upload.php2.11 ▼1.184.56 ▼20.37
Raadso Like Button /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php2.124.81

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 28 new options
New WordPress options
rd_like_show_on_page
rd_like_margin_bottom
rd_like_google1
rd_like_margin_right
rd_like_font
rd_like_defaultpic
rd_like_opengraph
rd_like_verb
rd_like_show_on_archive
rd_like_xfbml
...

Browser metrics Passed 4 tests

Raadso Like Button: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲6516.16 ▲0.436.73 ▲0.852.51 ▼0.09
Dashboard /wp-admin2,897 ▲366.16 ▼0.04117.75 ▼23.50157.33 ▼7.79
Posts /wp-admin/edit.php2,690 ▼13.24 ▼0.1364.60 ▼2.13143.42 ▼1.74
Add New Post /wp-admin/post-new.php1,714 ▼321.08 ▼0.12425.35 ▼11.66166.36 ▲10.03
Media Library /wp-admin/upload.php1,703 ▲55.50 ▼0.04139.58 ▼0.91189.33 ▲2.65
Raadso Like Button /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php1,0672.7156.08151.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/raadso-like-button/raadso-like-button.php+404
    Methods with the same name as their class will not be constructors in a future version of PHP; rd_like_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 28 options in the database
    • rd_like_appid
    • rd_like_defaultpic
    • rd_like_verb
    • rd_like_valid
    • rd_like_margin_left
    • rd_like_showfaces
    • rd_like_opengraph
    • rd_like_margin_right
    • rd_like_send
    • rd_like_excl_post
    • ...

Smoke tests 25% 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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > Deprecated in wp-content/plugins/raadso-like-button/raadso-like-button.php+404
    Methods with the same name as their class will not be constructors in a future version of PHP; rd_like_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > Deprecated in wp-content/plugins/raadso-like-button/raadso-like-button.php+79
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > Warning in wp-content/plugins/raadso-like-button/raadso-like-button.php+137
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in rd_like_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > User deprecated in wp-includes/functions.php+5600
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/raadso-like-button/raadso-like-button.php:404

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=raadso-like-button/raadso-like-button.php
    • > Network (severe)
    http://www.raadso.so/static/socialbuttons.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Invalid URI ("")
  • Screenshots: Add images for these screenshots: #1 (http://www.raadso.so/downloads/wp/screenshot-1.jpg), #2 (http://www.raadso.so/downloads/wp/screenshot-2.jpg)
The official readme.txt is a good inspiration

raadso-like-button/raadso-like-button.php 92% from 13 tests

The main PHP file in "Raadso Like Button" ver. 1.6.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin405 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110252402
JavaScript1243

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity7.75
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin