84% social-icons-for-mastodon

Code Review | Mastodon Social Icons

WordPress plugin Mastodon Social Icons scored84%from 54 tests.

About plugin

  • Plugin page: social-icons-for-...
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2023
  • Latest release: Feb 28, 2023
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: triumvirate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.67ms] Passed 4 tests

An overview of server-side resources used by Mastodon Social Icons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.01 ▼3.15
Dashboard /wp-admin3.31 ▲0.0147.76 ▼3.27
Posts /wp-admin/edit.php3.36 ▲0.0049.69 ▼0.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.03 ▲1.15
Media Library /wp-admin/upload.php3.23 ▲0.0036.62 ▲0.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Mastodon Social Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.331.78 ▼0.0838.94 ▼4.17
Dashboard /wp-admin2,192 ▲155.57 ▼0.0990.11 ▼5.3738.31 ▼10.21
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0340.30 ▲3.2335.88 ▲1.15
Add New Post /wp-admin/post-new.php1,528 ▲223.37 ▲0.27644.91 ▼38.3160.88 ▲10.17
Media Library /wp-admin/upload.php1,397 ▼64.21 ▲0.0399.40 ▼4.2145.29 ▼3.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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
Good news, no errors were detected

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
Please fix the following
  • 1× 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/social-icons-for-mastodon/social_icons_map_filters.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: mastodon, svg, social

social-icons-for-mastodon/social_icons_map_filters.php 92% from 13 tests

The primary PHP file in "Mastodon Social Icons" version 0.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-icons-for-mastodon.php" instead of "social_icons_map_filters.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin136 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112109
Markdown116027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin