10% recommended-for-you

Code Review | Recommended For You

WordPress plugin Recommended For You scored 10% from 54 tests.

About plugin

  • Plugin page: recommended-for-you
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.7
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Mar 9, 2021
  • Number of updates: 24
  • Update frequency: every 92.6 days
  • Top authors: mukkiee (62.5%)promz (41.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,114 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/recommended-for-you/rfy-front-end.php+18
    Trying to access array offset on value of type bool

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

Analyzing server-side resources used by Recommended For You
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.02 ▼0.88
Dashboard /wp-admin3.35 ▲0.0445.11 ▼3.06
Posts /wp-admin/edit.php3.40 ▲0.0448.90 ▲1.06
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.72 ▼3.08
Media Library /wp-admin/upload.php3.27 ▲0.0435.77 ▲1.01

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
rfy_settings
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Recommended For You
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲16613.58 ▼0.799.13 ▲7.5639.02 ▼9.00
Dashboard /wp-admin2,222 ▲374.79 ▼1.02106.82 ▲1.0840.42 ▼4.51
Posts /wp-admin/edit.php2,105 ▲132.00 ▼0.0340.16 ▼1.5535.60 ▼0.23
Add New Post /wp-admin/post-new.php1,547 ▲1323.02 ▼0.08629.29 ▲32.1454.41 ▲4.80
Media Library /wp-admin/upload.php1,404 ▲224.18 ▼0.0898.51 ▲1.3440.92 ▼2.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× 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/recommended-for-you/rfy-functions.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recommended-for-you/rfy-front-end.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/recommended-for-you/init.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recommended-for-you/rfy-admin.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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 your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

recommended-for-you/init.php 85% from 13 tests

"Recommended For You" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "5.5.3")
  • Main file name: Name the main plugin file the same as the plugin slug ("recommended-for-you.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected357 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP46577211
JavaScript22322102
CSS12044

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin