73% rsrpp

Code Review | Really Simple Related Posts Plugin

WordPress plugin Really Simple Related Posts Plugin scored73%from 54 tests.

About plugin

  • Plugin page: rsrpp
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Mar 27, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: marcinmrowiec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.42ms] Passed 4 tests

Analyzing server-side resources used by Really Simple Related Posts Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.84 ▲0.51
Dashboard /wp-admin3.39 ▲0.0445.78 ▼19.13
Posts /wp-admin/edit.php3.50 ▲0.1549.07 ▼0.07
Add New Post /wp-admin/post-new.php5.99 ▲0.1080.21 ▼11.00
Media Library /wp-admin/upload.php3.31 ▲0.0836.05 ▲4.44
RSRPP Settings /wp-admin/options-general.php?page=rsrpp3.2529.59

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Really Simple Related Posts Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.61 ▼0.775.48 ▲3.5443.09 ▼1.12
Dashboard /wp-admin2,214 ▲294.83 ▼0.07110.25 ▼3.4339.78 ▼8.37
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0540.48 ▲4.5334.57 ▼2.01
Add New Post /wp-admin/post-new.php1,521 ▼1217.61 ▼5.41663.34 ▼5.3348.73 ▲0.16
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.04103.53 ▲4.1243.66 ▼0.45
RSRPP Settings /wp-admin/options-general.php?page=rsrpp8282.0625.5933.38

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=rsrpp
    • > Warning in wp-content/plugins/rsrpp/admin/class-rsrpp-admin.php+83
    Illegal string offset 'text_title'
    • > GET request to /wp-admin/options-general.php?page=rsrpp
    • > Warning in wp-content/plugins/rsrpp/admin/class-rsrpp-admin.php+88
    Illegal string offset 'number_numerofposts'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rsrpp
    • > Notice in wp-content/plugins/rsrpp/admin/class-rsrpp-admin.php+97
    Trying to access array offset on value of type bool

SRP 0% 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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rsrpp/public/partials/rsrpp-public-display.php
    • > /wp-content/plugins/rsrpp/admin/partials/rsrpp-admin-display.php
    • > /wp-content/plugins/rsrpp/templates/rsrpp-template.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/rsrpp/templates/rsrpp-template.php on line 4
    • > PHP Notice
      Undefined variable: related_posts in wp-content/plugins/rsrpp/templates/rsrpp-template.php on line 4
    • > PHP Notice
      Undefined variable: related_post_title in wp-content/plugins/rsrpp/templates/rsrpp-template.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: related, template, posts

rsrpp/rsrpp.php Passed 13 tests

The main file in "Really Simple Related Posts Plugin" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Simple plugin to display related posts with shortcodes.

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
Everything looks great! No dangerous files found in this plugin389 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14134547313
PO File1131545
CSS20825
JavaScript24546

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin