79% link-verification-for-mastodon

Code Review | Link Verification for Mastodon

WordPress plugin Link Verification for Mastodon scored79%from 54 tests.

About plugin

  • Plugin page: link-verification...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2022
  • Latest release: Apr 15, 2023
  • Number of updates: 7
  • Update frequency: every 21.1 days
  • Top authors: overengineer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /2,927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.68ms] Passed 4 tests

A check of server-side resources used by Link Verification for Mastodon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0334.57 ▼4.16
Dashboard /wp-admin3.36 ▲0.0642.40 ▼7.48
Posts /wp-admin/edit.php3.47 ▲0.1241.87 ▲0.39
Add New Post /wp-admin/post-new.php5.94 ▲0.0678.93 ▼14.64
Media Library /wp-admin/upload.php3.28 ▲0.0633.85 ▼0.43
Mastodon Verification /wp-admin/options-general.php?page=link-verification-for-mastodon3.2232.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Link Verification for Mastodon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼1.154.66 ▲2.8343.53 ▲0.79
Dashboard /wp-admin2,204 ▲165.91 ▲0.8698.47 ▼20.0437.38 ▼10.33
Posts /wp-admin/edit.php2,093 ▲222.05 ▲0.0132.94 ▼4.4733.83 ▼1.27
Add New Post /wp-admin/post-new.php1,523 ▲323.07 ▼0.11674.22 ▲22.6449.19 ▼14.65
Media Library /wp-admin/upload.php1,389 ▲14.28 ▲0.0694.32 ▼7.2942.09 ▼4.96
Mastodon Verification /wp-admin/options-general.php?page=link-verification-for-mastodon7882.0623.9133.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=link-verification-for-mastodon
    • > Notice in wp-content/plugins/link-verification-for-mastodon/admin/settings.php+81
    Trying to access array offset on value of type bool

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 fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/link-verification-for-mastodon/admin/settings.php
    • > /wp-content/plugins/link-verification-for-mastodon/link-verification-for-mastodon.php
    • > /wp-content/plugins/link-verification-for-mastodon/uninstall.php
    • > /wp-content/plugins/link-verification-for-mastodon/includes/class-utils.php
    • > /wp-content/plugins/link-verification-for-mastodon/includes/verification-tag.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: fediverse, mastodon, social

link-verification-for-mastodon/link-verification-for-mastodon.php Passed 13 tests

The main PHP file in "Link Verification for Mastodon" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
69 characters long description:
A WordPress plugin to quickly verify a link on your Mastodon profile.

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
There were no executable files found in this plugin241 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP677164241

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
PNG images were not found in this plugin