77% relevant

Code Review | Relevant - Related, Featured, Latest, and Popular Posts by BestWebSoft

WordPress plugin Relevant - Related, Featured, Latest, and Popular Posts by BestWebSoft scored77%from 54 tests.

About plugin

  • Plugin page: relevant
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: May 22, 2023
  • Number of updates: 57
  • Update frequency: every 61.7 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /65,980 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
Install script ran successfully

Server metrics [RAM: ▲1.22MB] [CPU: ▲2.80ms] Passed 4 tests

Analyzing server-side resources used by Relevant - Related, Featured, Latest, and Popular Posts by BestWebSoft
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.72 ▲1.2658.23 ▲14.24
Dashboard /wp-admin4.55 ▲1.2558.18 ▲4.23
Posts /wp-admin/edit.php4.61 ▲1.2557.55 ▲5.10
Add New Post /wp-admin/post-new.php7.10 ▲1.2199.10 ▼12.39
Media Library /wp-admin/upload.php4.41 ▲1.1852.94 ▲16.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 126 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
bstwbsftwppdtplgns_options
can_compress_scripts
widget_pplrpsts_popular_posts_widget
rltdpstsplgn_options
widget_ltstpsts_latest_posts_widget
widget_rltdpstsplgnwidget
widget_recent-posts
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Relevant - Related, Featured, Latest, and Popular Posts by BestWebSoft
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.29 ▼0.961.77 ▼0.0451.47 ▲9.43
Dashboard /wp-admin2,321 ▲1305.89 ▲0.99103.09 ▲0.7142.94 ▼2.19
Posts /wp-admin/edit.php2,214 ▲1252.24 ▲0.2537.21 ▼4.1936.34 ▼2.68
Add New Post /wp-admin/post-new.php6,378 ▲4,83626.00 ▲7.69962.77 ▲323.0261.65 ▲3.48
Media Library /wp-admin/upload.php1,503 ▲1154.24 ▲0.06102.36 ▼1.1048.54 ▲5.99
BWS Panel /wp-admin/related-posts-plugin.php?page=rltdpstsplgn-bws-panel260.440.1014.13
Settings /wp-admin/related-posts-plugin.php260.440.128.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/relevant/includes/widgets.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/relevant/includes/class-rltdpstsplgn-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/relevant/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/relevant/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/relevant/includes/widgets.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/related-posts-plugin.php?page=rltdpstsplgn-bws-panel
    • > Network (severe)
    wp-admin/related-posts-plugin.php?page=rltdpstsplgn-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/related-posts-plugin.php
    • > Network (severe)
    wp-admin/related-posts-plugin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Related Posts Widget.), #2 (Latest Posts Widget.), #3 (Popular Posts Widget.), #4 (The displaying of Featured Posts block with Custom plugin settings (default theme).), #5 (The displaying of Featured Posts block with Custom plugin settings (BestWebSoft theme).), #6 (Related Posts Settings page.), #7 (Featured Posts settings.), #8 (Latest Posts Settings page.), #9 (Popular Posts Settings page.), #10 (Relevant widgets settings.)
Please take inspiration from this readme.txt

relevant/related-posts-plugin.php 92% from 13 tests

The principal PHP file in "Relevant - Related, Featured, Latest, and Popular Posts by BestWebSoft" v. 1.4.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("relevant.php" instead of "related-posts-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected21,658 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PO File103,8986,3038,099
PHP106357037,200
CSS101932815,657
JavaScript732112552
SVG400150

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity77.83
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity11.98
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods3685.71%
▷ Protected methods00.00%
▷ Private methods614.29%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
68 PNG files occupy 3.86MB with 1.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_cd0a0a_256x240.png4.49KB4.20KB▼ 6.46%
screenshot-9.png80.69KB38.04KB▼ 52.86%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
bws_menu/icons/themes/renty.png657.95KB198.11KB▼ 69.89%
bws_menu/images/close_banner.png0.44KB0.49KB0.00%