10% wp-float-related-posts

Code Review | WP Float Related Posts

WordPress plugin WP Float Related Posts scored10%from 54 tests.

About plugin

  • Plugin page: wp-float-related-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Aug 8, 2015
  • Number of updates: 24
  • Update frequency: every 0.2 days
  • Top authors: darko.atanasovski (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,530 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RelatedPosts::activate() should not be called statically

Server metrics [RAM: ▼1.83MB] [CPU: ▼53.02ms] Passed 4 tests

A check of server-side resources used by WP Float Related Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.41 ▼4.45
Dashboard /wp-admin2.11 ▼1.197.06 ▼43.80
Posts /wp-admin/edit.php2.11 ▼1.246.69 ▼40.74
Add New Post /wp-admin/post-new.php2.11 ▼3.776.19 ▼99.56
Media Library /wp-admin/upload.php2.11 ▼1.116.58 ▼27.98

Server storage [IO: ▲0.52MB] [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: 13 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
rp-title
rp-scrollpercent
widget_recent-comments
widget_recent-posts
rp-timeoutms
rp-show-random
rp-effect
db_upgraded
rp-gatracking
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Float Related Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10513.67 ▼0.732.18 ▼0.4142.89 ▼8.45
Dashboard /wp-admin2,242 ▲574.92 ▼0.94115.84 ▼2.3239.71 ▼3.70
Posts /wp-admin/edit.php2,122 ▲332.20 ▲0.1841.97 ▲5.1935.61 ▲0.86
Add New Post /wp-admin/post-new.php1,535 ▲14323.67 ▲5.22699.22 ▲47.8759.04 ▲3.06
Media Library /wp-admin/upload.php1,421 ▲304.29 ▲0.11108.19 ▲6.2045.44 ▲1.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the rp-admin-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • rp-read-more-text
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-float-related-posts/templates/default.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-float-related-posts/inc/admin.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

wp-float-related-posts/RelatedPosts.php 92% from 13 tests

The main PHP file in "WP Float Related Posts" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-float-related-posts.php" instead of "RelatedPosts.php")

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 detected439 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3117292
JavaScript30782
CSS20065

PHP code Passed 2 tests

This is a short overview 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.43
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.47MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/box.png44.90KB28.12KB▼ 37.37%
screenshot-1.png68.48KB33.15KB▼ 51.60%
screenshot-2.png363.14KB75.18KB▼ 79.30%