78% related-posts-lite

Code Review | Related Posts Lite

WordPress plugin Related Posts Lite scored 78% from 54 tests.

About plugin

  • Plugin page: related-posts-lite
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 5.8.1
  • First release: Aug 8, 2014
  • Latest release: Oct 2, 2015
  • Number of updates: 17
  • Update frequency: every 24.7 days
  • Top authors: wpdreams (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active / 9,590 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
Installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▼136.30ms] Passed 4 tests

A check of server-side resources used by Related Posts Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.36 ▲0.5328.19 ▲7.88
Dashboard /wp-admin3.58 ▲0.5135.00 ▼1.54
Posts /wp-admin/edit.php3.63 ▲0.5235.21 ▲4.90
Add New Post /wp-admin/post-new.php6.39 ▲0.9589.69 ▼556.43
Media Library /wp-admin/upload.php3.45 ▲0.4563.90 ▲40.57

Server storage [IO: ▲1.51MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 171 new files
Database: no new tables, 3 new options
New WordPress options
rpl_options
rpl_version
rpl_defaults

Browser metrics Passed 4 tests

An overview of browser requirements for Related Posts Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,856 ▲25516.19 ▲0.579.46 ▲4.3977.58 ▲5.08
Dashboard /wp-admin2,948 ▲556.14 ▲0.04113.58 ▼17.64185.40 ▲13.69
Posts /wp-admin/edit.php2,761 ▲213.12 ▼0.1164.13 ▼2.02141.36 ▲1.32
Add New Post /wp-admin/post-new.php1,781 ▼2,03221.49 ▲2.50406.17 ▼55.67190.90 ▲20.80
Media Library /wp-admin/upload.php1,769 ▲175.55 ▲0.06132.18 ▼15.72215.80 ▲33.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 3 options
    • rpl_options
    • rpl_defaults
    • rpl_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/related-posts-lite/backend/tabs/instance/layout/output-placement.php
  • 78× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsType' not found in wp-content/plugins/related-posts-lite/backend/settings/class/border.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsType' not found in wp-content/plugins/related-posts-lite/backend/settings/class/imageradio.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsGradient' not found in wp-content/plugins/related-posts-lite/backend/tabs/instance/theme/nav_buttons.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsType' not found in wp-content/plugins/related-posts-lite/backend/settings/class/boxshadow-mini.class.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'AJAXSEARCHPRO_PATH/settings/comp_check.php' (include_path='.:/usr/share/php') in wp-content/plugins/related-posts-lite/comp_check.php on line 3
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/related-posts-lite/includes/views/rpl.shortcode.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsTextSmall' not found in wp-content/plugins/related-posts-lite/backend/tabs/instance/theme/layout_slick.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsCompatibility' not found in wp-content/plugins/related-posts-lite/backend/comp_check.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsCompatibility' not found in wp-content/plugins/related-posts-lite/compatibility.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'wpdreamsType' not found in wp-content/plugins/related-posts-lite/backend/settings/class/uploadreset.class.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt is a good inspiration

related-posts-lite/related-posts-lite.php Passed 13 tests

The entry point to "Related Posts Lite" version 1.12 is a PHP file that has certain tags in its header comment area
47 characters long description:
An elegant and powerful related posts solution.

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 detected24,093 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
CSS111,379947,771
PHP857659967,189
JSON1005,143
JavaScript99264133,610
PO File2134144320
SVG522660

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.55
▷ Minimum class complexity1.00
▷ Maximum class complexity239.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes00.00%
▷ Concrete classes51100.00%
▷ Final classes00.00%
Methods199
▷ Static methods126.03%
▷ Public methods19597.99%
▷ Protected methods42.01%
▷ Private methods00.00%
Functions54
▷ Named functions54100.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
44 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend/settings/assets/icons/pen.png1.09KB0.32KB▼ 70.30%
backend/settings/assets/icons/b-warning.png1.75KB0.83KB▼ 52.48%
backend/settings/assets/icons/black_arrow.png2.08KB2.57KB0.00%
img/up.png1.06KB0.15KB▼ 85.66%
backend/settings/assets/icons/upload-before.png0.99KB0.20KB▼ 79.51%