79% link-badges

Code Review | Link Badges

WordPress plugin Link Badges scored79%from 54 tests.

About plugin

  • Plugin page: link-badges
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Nov 17, 2020
  • Number of updates: 10
  • Update frequency: every 272.2 days
  • Top authors: marcus.downing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,375 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
Installer ran successfully

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

This is a short check of server-side resources used by Link Badges
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1451.73 ▲6.96
Dashboard /wp-admin3.43 ▲0.1248.64 ▼9.29
Posts /wp-admin/edit.php3.54 ▲0.1950.62 ▲0.01
Add New Post /wp-admin/post-new.php6.01 ▲0.1285.05 ▼21.89
Media Library /wp-admin/upload.php3.35 ▲0.1234.75 ▼1.00

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Link Badges
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.43 ▼0.211.84 ▼0.0443.56 ▼1.48
Dashboard /wp-admin2,200 ▲235.58 ▼0.1089.70 ▼2.3539.50 ▼1.34
Posts /wp-admin/edit.php2,108 ▲82.00 ▼0.0139.20 ▼2.2635.00 ▼3.59
Add New Post /wp-admin/post-new.php1,540 ▲423.04 ▲4.70634.70 ▼31.5450.14 ▼16.57
Media Library /wp-admin/upload.php1,411 ▲114.21 ▲0.0496.37 ▼16.2942.91 ▲0.42
Link Badges /wp-admin/link-badges.php260.420.0616.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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)
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-badges/link-badges.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/link-badges/link-badges-settings.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/link-badges.php
    • > Network (severe)
    wp-admin/link-badges.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: anchor

link-badges/link-badges.php Passed 13 tests

"Link Badges" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Adds classes to indicate links to PDF, DOC, XLS etc files

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,506 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS40192,079
PHP514354735
SVG100655
JavaScript23337

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bang-widget.png0.81KB1.11KB0.00%
images/bang-black-v.png3.58KB0.72KB▼ 79.87%
images/bang.png3.76KB1.22KB▼ 67.67%
images/img.png0.61KB0.89KB0.00%
images/ppt.png0.78KB0.99KB0.00%