90% share-on-pixelfed

Code Review | Share on Pixelfed

WordPress plugin Share on Pixelfed scored90%from 54 tests.

About plugin

  • Plugin page: share-on-pixelfed
  • Plugin version: 0.9.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: Nov 11, 2023
  • Number of updates: 6
  • Update frequency: every 154.3 days
  • Top authors: janboddez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /891 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.80ms] Passed 4 tests

Server-side resources used by Share on Pixelfed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.40 ▼2.58
Dashboard /wp-admin3.34 ▲0.0344.20 ▼6.55
Posts /wp-admin/edit.php3.39 ▲0.0345.12 ▼1.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.53 ▼8.48
Media Library /wp-admin/upload.php3.26 ▲0.0339.61 ▲4.65
Share on Pixelfed /wp-admin/options-general.php?page=share-on-pixelfed3.2330.10

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
share_on_pixelfed_settings
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Share on Pixelfed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.71 ▲0.441.71 ▼0.0136.78 ▼6.88
Dashboard /wp-admin2,196 ▲165.60 ▼0.0786.62 ▼3.9537.74 ▼3.33
Posts /wp-admin/edit.php2,104 ▲12.11 ▲0.1136.84 ▼4.7532.98 ▼7.35
Add New Post /wp-admin/post-new.php1,705 ▲16522.62 ▼0.58689.32 ▲35.7829.38 ▼21.26
Media Library /wp-admin/upload.php1,401 ▲14.14 ▼0.1297.72 ▲0.2943.40 ▲0.01
Share on Pixelfed /wp-admin/options-general.php?page=share-on-pixelfed8651.9923.5929.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • share_on_pixelfed_settings
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: publicize, fediverse, crosspost, pixelfed, share

share-on-pixelfed/share-on-pixelfed.php Passed 13 tests

The main file in "Share on Pixelfed" v. 0.9.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Easily share WordPress (image) posts on Pixelfed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,757 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP93386761,522
JavaScript23220207
CSS15028

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity37.29
▷ Minimum class complexity3.00
▷ Maximum class complexity101.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods1728.33%
▷ Public methods4473.33%
▷ Protected methods1016.67%
▷ Private methods610.00%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin