80% related-posts-for-wp

Code Review | Related Posts for WordPress

WordPress plugin Related Posts for WordPress scored80%from 54 tests.

About plugin

  • Plugin page: related-posts-for-wp
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2014
  • Latest release: Oct 5, 2023
  • Number of updates: 90
  • Update frequency: every 37.2 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

314 reviews

Install metrics

30,000+ active /521,491 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.88ms] Passed 4 tests

Analyzing server-side resources used by Related Posts for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1640.73 ▼0.37
Dashboard /wp-admin3.49 ▲0.1450.23 ▼10.94
Posts /wp-admin/edit.php3.54 ▲0.1850.88 ▲1.06
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.43 ▼21.26
Media Library /wp-admin/upload.php3.35 ▲0.1239.09 ▲3.11
RP4WPINSTALL /wp-admin/admin.php?page=rp4wp_install3.2932.52
Link_Related_Screen /wp-admin/admin.php?page=rp4wp_link_related3.2933.79
Related Posts /wp-admin/options-general.php?page=rp4wp3.3233.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 111 new files
Database: 1 new table, 7 new options
New tables
wp_rp4wp_cache
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
widget_rp4wp_related_posts_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Related Posts for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.47 ▲0.201.61 ▼0.3142.64 ▼1.33
Dashboard /wp-admin2,196 ▲195.61 ▼0.0596.02 ▲7.8439.97 ▼4.71
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0139.55 ▼0.3336.77 ▼2.45
Add New Post /wp-admin/post-new.php6,238 ▲4,70426.11 ▲7.73941.05 ▲291.0838.47 ▼45.34
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.07100.30 ▼0.5647.65 ▼1.44
RP4WPINSTALL /wp-admin/admin.php?page=rp4wp_install6801.6015.5018.91
Link_Related_Screen /wp-admin/admin.php?page=rp4wp_link_related7111.517.0013.19
Related Posts /wp-admin/options-general.php?page=rp4wp1,0631.7124.2740.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_rp4wp_cache
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_rp4wp_related_posts_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 22 tag instead of maximum 10
Please take inspiration from this readme.txt

related-posts-for-wp/related-posts-for-wp.php Passed 13 tests

Analyzing the main PHP file in "Related Posts for WordPress" version 2.2.1
80 characters long description:
Related Posts for WordPress, the best way to display related posts in WordPress.

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
Everything looks great! No dangerous files found in this plugin7,076 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
PO File91,4131,5663,564
PHP721,0431,6213,112
JavaScript65629188
Sass3330172
Markdown116030
XML1007
CSS3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.42
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes48
▷ Abstract classes36.25%
▷ Concrete classes4593.75%
▷ Final classes00.00%
Methods197
▷ Static methods3618.27%
▷ Public methods17186.80%
▷ Protected methods00.00%
▷ Private methods2613.20%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants16
▷ Global constants16.25%
▷ Class constants1593.75%
▷ Public constants15100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/never5-logo.png9.76KB3.69KB▼ 62.20%
assets/images/grabber.png0.95KB0.13KB▼ 86.45%