78% recent-related-post-and-page

Code Review | Recent Related Post And Page

WordPress plugin Recent Related Post And Page scored78%from 54 tests.

About plugin

  • Plugin page: recent-related-po...
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: May 4, 2016
  • Latest release: Nov 6, 2023
  • Number of updates: 60
  • Update frequency: every 46.5 days
  • Top authors: weblizar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /13,460 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.73ms] Passed 4 tests

This is a short check of server-side resources used by Recent Related Post And Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.98 ▼1.41
Dashboard /wp-admin3.35 ▲0.0548.24 ▼4.02
Posts /wp-admin/edit.php3.41 ▲0.0549.66 ▲4.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.28 ▲3.48
Media Library /wp-admin/upload.php3.27 ▲0.0433.29 ▼0.97
All Shortcode /wp-admin/edit.php?post_type=rp_and_rp3.3334.00
Page/Post settings /wp-admin/edit.php?post_type=rp_and_rp&page=recent-related-post-and-page3.3936.05
Add New /wp-admin/post-new.php?post_type=rp_and_rp3.6146.50
Help and Support /wp-admin/edit.php?post_type=rp_and_rp&page=recent-related-post-and-page_pro3.2830.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_rp_and_rp
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Recent Related Post And Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲13113.42 ▼0.987.96 ▲6.0837.78 ▼6.71
Dashboard /wp-admin2,241 ▲645.64 ▲0.0682.77 ▼20.1340.22 ▼2.93
Posts /wp-admin/edit.php2,206 ▲1062.52 ▲0.5772.14 ▲36.8432.55 ▼6.16
Add New Post /wp-admin/post-new.php1,605 ▲7923.55 ▲0.25613.51 ▼52.6733.14 ▼16.14
Media Library /wp-admin/upload.php1,443 ▲434.25 ▲0.0795.72 ▼6.9740.79 ▼3.70
All Shortcode /wp-admin/edit.php?post_type=rp_and_rp1,1862.3838.0028.30
Page/Post settings /wp-admin/edit.php?post_type=rp_and_rp&page=recent-related-post-and-page1,9812.3562.7539.72
Add New /wp-admin/post-new.php?post_type=rp_and_rp5,1314.45156.49120.31
Help and Support /wp-admin/edit.php?post_type=rp_and_rp&page=recent-related-post-and-page_pro8702.1722.9939.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_rp_and_rp
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rp_and_rp
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=rp_and_rp
    • > Network (severe)
    wp-content/plugins/recent-related-post-and-page/settings/images/hover.png - Failed to load resource: the server responded with a status of 404 (Not 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

recent-related-post-and-page/recent-related-post-and-page.php 92% from 13 tests

The main PHP file in "Recent Related Post And Page" ver. 1.4.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 211 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin22,500 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,954
JavaScript99689618,348
PHP153661223,253
CSS9133301,184
PO File1501776761

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.50
▷ Minimum class complexity9.00
▷ Maximum class complexity12.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
settings/images/template-1.png71.07KB23.29KB▼ 67.23%
settings/images/template-2.png82.94KB26.42KB▼ 68.15%