74% awesome-simple-related-posts

Code Review | Simple Related Posts

WordPress plugin Simple Related Posts scored74%from 54 tests.

About plugin

  • Plugin page: awesome-simple-re...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Feb 27, 2023
  • Number of updates: 42
  • Update frequency: every 53.4 days
  • Top authors: amanhstu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,041 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.93MB] [CPU: ▼55.98ms] Passed 4 tests

Server-side resources used by Simple Related Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.10 ▼41.42
Dashboard /wp-admin2.08 ▼1.236.57 ▼42.74
Posts /wp-admin/edit.php2.08 ▼1.286.37 ▼43.66
Add New Post /wp-admin/post-new.php2.08 ▼3.815.63 ▼96.09
Media Library /wp-admin/upload.php2.08 ▼1.156.54 ▼30.51

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Related Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.74 ▲0.521.74 ▼0.2447.89 ▲6.59
Dashboard /wp-admin2,211 ▲294.87 ▼0.96124.26 ▲15.4550.18 ▲6.94
Posts /wp-admin/edit.php2,103 ▲112.05 ▲0.0839.68 ▲3.2031.72 ▼6.83
Add New Post /wp-admin/post-new.php1,540 ▲723.48 ▼0.05679.73 ▼12.1777.80 ▲5.19
Media Library /wp-admin/upload.php1,402 ▲174.11 ▼0.10109.60 ▼4.1943.52 ▼7.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 amanhstur 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: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-simple-related-posts/settings/options-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (sc1.png) image required
The official readme.txt is a good inspiration

awesome-simple-related-posts/simple_related_post.php 92% from 13 tests

The primary PHP file in "Simple Related Posts" version 3.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-simple-related-posts.php" instead of "simple_related_post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3451269
CSS19018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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