84% tootpress

Code Review | TootPress

WordPress plugin TootPress scored84%from 54 tests.

About plugin

  • Plugin page: tootpress
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2023
  • Latest release: Apr 17, 2023
  • Number of updates: 19
  • Update frequency: every 0.9 days
  • Top authors: unmus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /496 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.31MB] [CPU: ▼2.91ms] Passed 4 tests

A check of server-side resources used by TootPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4641.62 ▲2.32
Dashboard /wp-admin3.64 ▲0.3447.93 ▼1.33
Posts /wp-admin/edit.php3.70 ▲0.3449.10 ▲1.40
Add New Post /wp-admin/post-new.php6.16 ▲0.2781.50 ▼12.41
Media Library /wp-admin/upload.php3.50 ▲0.2734.18 ▲0.70
Toots /wp-admin/tools.php?page=tootpress-tools-menu3.4832.26
TootPress /wp-admin/options-general.php?page=tootpress-options3.4733.19

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: 2 new tables, 26 new options
New tables
wp_tootpress_media
wp_tootpress_toots
New WordPress options
widget_theysaidso_widget
tootpress_latest_toot
tootpress_cron_newtoots_status
tootpress_mastodon_amount_of_requests
tootpress_database_version
tootpress_css
tootpress_amount_toots_page
theysaidso_admin_options
tootpress_active
tootpress_navigation
...

Browser metrics Passed 4 tests

A check of browser resources used by TootPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.28 ▲0.011.97 ▲0.3641.69 ▼2.10
Dashboard /wp-admin2,203 ▲295.61 ▲0.0390.79 ▼15.9037.16 ▼9.57
Posts /wp-admin/edit.php2,105 ▲82.01 ▲0.0540.02 ▲2.8234.54 ▲3.05
Add New Post /wp-admin/post-new.php1,532 ▲623.46 ▲0.21588.34 ▼78.7557.08 ▲3.54
Media Library /wp-admin/upload.php1,408 ▲84.14 ▼0.0993.77 ▼15.2542.66 ▼1.05
Toots /wp-admin/tools.php?page=tootpress-tools-menu8961.9921.6834.46
TootPress /wp-admin/options-general.php?page=tootpress-options8922.0122.6429.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • mathilda_database_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/tools.php?page=tootpress-tools-menu
    • > Network (severe)
    wp-content/plugins/tootpress_tools.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mastodon, fediverse, blog, microblogging, toots

tootpress/tootpress.php 92% from 13 tests

Analyzing the main PHP file in "TootPress" version 0.2.1
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,792 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP258181,2781,743
CSS214649

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions135
▷ Named functions135100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tootpress_toot.png1.23KB1.02KB▼ 17.00%