83% floating-related-posts

Code Review | Floating Related Posts

WordPress plugin Floating Related Posts scored83%from 54 tests.

About plugin

  • Plugin page: floating-related-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 13, 2020
  • Latest release: Jan 4, 2022
  • Number of updates: 17
  • Update frequency: every 26.6 days
  • Top authors: fransoft (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /1,574 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.59ms] Passed 4 tests

A check of server-side resources used by Floating Related Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.23 ▼4.64
Dashboard /wp-admin3.37 ▲0.0748.54 ▲0.71
Posts /wp-admin/edit.php3.43 ▲0.0748.26 ▼2.74
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.33 ▼15.70
Media Library /wp-admin/upload.php3.30 ▲0.0634.83 ▲2.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
floating_related_posts_pro
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Floating Related Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12613.24 ▼1.384.51 ▲2.4341.29 ▼2.43
Dashboard /wp-admin2,292 ▲1014.86 ▼0.03107.16 ▲0.6638.92 ▼1.98
Posts /wp-admin/edit.php2,176 ▲872.06 ▲0.0841.37 ▲0.2334.58 ▼2.29
Add New Post /wp-admin/post-new.php1,555 ▲3923.03 ▲5.49641.05 ▲22.1151.24 ▲2.46
Media Library /wp-admin/upload.php1,471 ▲834.24 ▼0.0899.02 ▲5.1841.10 ▼1.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • floating_related_posts_pro
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/floating-related-posts/floating-related-posts-pro.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: Contributors not specified
You can look at the official readme.txt

floating-related-posts/floating-related-posts-pro.php 85% from 13 tests

This is the main PHP file of "Floating Related Posts" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("floating-related-posts.php" instead of "floating-related-posts-pro.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,611 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript514228791
PHP21579468
CSS3604352

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/images/preview.png18.10KB6.51KB▼ 64.05%