10% link-back-badge-widget

Code Review | Link Back Badge Widget

WordPress plugin Link Back Badge Widget scored10%from 54 tests.

About plugin

  • Plugin page: link-back-badge-w...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2014
  • Latest release: Oct 23, 2016
  • Number of updates: 13
  • Update frequency: every 59.4 days
  • Top authors: maurisrx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,312 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/link-back-badge-widget/includes/widget-class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; LBBW_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼45.04ms] Passed 4 tests

This is a short check of server-side resources used by Link Back Badge Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.30 ▼28.41
Dashboard /wp-admin2.29 ▼1.0110.55 ▼39.64
Posts /wp-admin/edit.php2.29 ▼1.0610.71 ▼36.59
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.33 ▼75.50
Media Library /wp-admin/upload.php2.29 ▼0.9410.86 ▼21.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_lbbw_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Link Back Badge Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.73 ▲0.331.75 ▲0.2047.48 ▲7.54
Dashboard /wp-admin2,195 ▲155.61 ▼0.0686.16 ▼12.4337.51 ▼7.64
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0434.13 ▲0.2335.68 ▲1.57
Add New Post /wp-admin/post-new.php1,535 ▲418.26 ▼4.89660.08 ▼19.2666.34 ▲18.19
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.0596.28 ▼1.5441.79 ▼3.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in LBBW_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_lbbw_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/link-back-badge-widget/includes/widget-class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-back-badge-widget/includes/register-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-back-badge-widget/includes/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-back-badge-widget/includes/scripts.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Plugin in Action), #2 (Widget Settings)
You can take inspiration from this readme.txt

link-back-badge-widget/link-back-badge-widget.php Passed 13 tests

Analyzing the main PHP file in "Link Back Badge Widget" version 1.0.2
105 characters long description:
Displays a badge and an HTML code box as a widget to ease your site visitor linking back to your website.

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 plugin113 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42050100
CSS13013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png21.89KB8.48KB▼ 61.24%
screenshot-1.png52.65KB21.15KB▼ 59.83%