79% related

Code Review | Manual Related Posts

WordPress plugin Manual Related Posts scored 79% from 54 tests.

About plugin

  • Plugin page: related
  • Plugin version: 3.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 13, 2010
  • Latest release: Aug 7, 2023
  • Number of updates: 272
  • Update frequency: every 17.9 days
  • Top authors: mpol (97.06%)chipsandtv (3.31%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active / 71,070 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: ▲0.21MB] [CPU: ▼8.80ms] Passed 4 tests

This is a short check of server-side resources used by Manual Related Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2148.95 ▲5.89
Dashboard /wp-admin3.51 ▲0.2048.16 ▲1.88
Posts /wp-admin/edit.php3.62 ▲0.2647.86 ▲1.12
Add New Post /wp-admin/post-new.php6.12 ▲0.2390.80 ▼40.42
Media Library /wp-admin/upload.php3.43 ▲0.2037.03 ▲2.21

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
can_compress_scripts
related_du_show
widget_recent-posts
related_du_list
db_upgraded
related_show
theysaidso_admin_options
widget_related_widget
related_list
...

Browser metrics Passed 4 tests

Manual Related Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5713.43 ▼0.831.85 ▼0.4243.61 ▼4.66
Dashboard /wp-admin2,218 ▲335.02 ▼0.88116.39 ▲9.4443.86 ▲2.40
Posts /wp-admin/edit.php2,105 ▲162.27 ▲0.3034.35 ▼5.7332.81 ▼2.52
Add New Post /wp-admin/post-new.php6,506 ▲4,98723.08 ▼0.41878.80 ▲267.3459.13 ▼1.37
Media Library /wp-admin/upload.php1,403 ▲184.34 ▲0.10102.21 ▼1.0342.11 ▲0.06
Related Posts /wp-admin/related.php260.440.0720.32

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 12 options
    • related_double_plugin
    • related_du_list
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • related_du_show
    • related_list
    • related_show
    • widget_related_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/related/widgets/related-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related/adminpages/page-related.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/related/related.php:464
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/related/widgets/related_du-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related/adminpages/page-related_du.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related/related_du.php:430

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/related.php
    • > Network (severe)
    wp-admin/related.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: related posts, related post, related, linked posts, linked post

related/related.php Passed 13 tests

"Manual Related Posts" version 3.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
A simple 'related posts' plugin that lets you select related posts manually.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected3,241 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP62902971,419
JavaScript4134401,345
CSS49659477

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.20
▷ Minimum class complexity2.00
▷ Maximum class complexity56.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
chosen/chosen-sprite.png0.53KB0.88KB0.00%