71% related-post-inside-plugin

Code Review | Related Post Inside Plugin

WordPress plugin Related Post Inside Plugin scored71%from 54 tests.

About plugin

  • Plugin page: related-post-insi...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 15, 2013
  • Latest release: Aug 20, 2023
  • Number of updates: 10
  • Update frequency: every 368.9 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /6,964 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲1,137.16ms] 50% from 4 tests

An overview of server-side resources used by Related Post Inside Plugin
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,335.09ms on /wp-admin/admin.php?page=related-post-inside-plugin-recommended-plugins)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 1,137.16ms on /wp-admin/admin.php?page=related-post-inside-plugin-recommended-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.19631.04 ▲591.20
Dashboard /wp-admin3.61 ▲0.311,536.65 ▲1,488.54
Posts /wp-admin/edit.php3.61 ▲0.251,300.58 ▲1,250.25
Add New Post /wp-admin/post-new.php6.09 ▲0.201,318.33 ▲1,223.59
Media Library /wp-admin/upload.php3.44 ▲0.221,522.14 ▲1,483.61
Related Post Inside /wp-admin/options-general.php?page=jeweltheme_rpi3.35652.17
Recommended /wp-admin/admin.php?page=related-post-inside-plugin-recommended-plugins3.421,335.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 13 new options
New WordPress options
jlt_rpsi_sheet_promo_data_hash
theysaidso_admin_options
related_post_inside_plugin_version
jlt_rpsi_sheet_promo_data
widget_theysaidso_widget
jlt_rpsi_notice_subscribe
jlt_rpsi_activation_time
jlt_rpsi_notice_what_we_collect
widget_recent-posts
jlt_rpsi_notice_ask_for_rating
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Related Post Inside Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲25513.51 ▼1.087.40 ▲5.7137.89 ▼4.40
Dashboard /wp-admin2,343 ▲1635.72 ▲0.0691.32 ▼0.4640.07 ▼2.38
Posts /wp-admin/edit.php2,200 ▲972.14 ▲0.1437.39 ▼1.1233.42 ▼6.63
Add New Post /wp-admin/post-new.php1,617 ▲8921.78 ▼1.60608.63 ▼65.3348.07 ▼0.81
Media Library /wp-admin/upload.php1,497 ▲974.22 ▼0.0398.15 ▲2.9141.90 ▼1.08
Related Post Inside /wp-admin/options-general.php?page=jeweltheme_rpi9811.8333.4726.60
Recommended /wp-admin/admin.php?page=related-post-inside-plugin-recommended-plugins1,2701.7130.0427.72

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
These items require your attention
  • The uninstall procedure has failed, leaving 13 options in the database
    • theysaidso_admin_options
    • jlt_rpsi_notice_what_we_collect
    • related_post_inside_plugin_version
    • widget_recent-posts
    • jlt_rpsi_sheet_promo_data_hash
    • jlt_rpsi_notice_subscribe
    • jlt_rpsi_notice_ask_for_rating
    • jlt_rpsi_sheet_promo_data
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jeweltheme_rpi
    • > Notice in wp-content/plugins/related-post-inside-plugin/class-related-post-inside-plugin.php+171
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'JLTRPSI\\Libs\\Upgrader' not found in wp-content/plugins/related-post-inside-plugin/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/related-post-inside-plugin/trunk/inc/easy-blocks.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/related-post-inside-plugin/related-post-inside-plugin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/related-post-inside-plugin/trunk/inc/easy-blocks.php:9
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/related-post-inside-plugin/trunk/inc/easy-blocks.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/related-post-inside-plugin/trunk/inc/class-tgm-plugin-activation.php:2016
    • > PHP Fatal error
      Uncaught Error: Class 'JLTRPSI\\Libs\\RowLinks' not found in wp-content/plugins/related-post-inside-plugin/Inc/Classes/Row_Links.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTRPSI\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/related-post-inside-plugin/Inc/Classes/Notifications/Ask_For_Rating.php:12
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/related-post-inside-plugin/trunk/inc/easy-blocks.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'JLTRPSI\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/related-post-inside-plugin/Inc/Classes/Notifications/Subscribe.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=related-post-inside-plugin-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Related Post Inside Plugin), #2 (Related Post Inside Plugin look and feel)
You can look at the official readme.txt

related-post-inside-plugin/related-post-inside-plugin.php 77% from 13 tests

The main PHP file in "Related Post Inside Plugin" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 244 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected5,758 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,4843,0564,998
CSS311814606
JavaScript2159154

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity18.23
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces8
Interfaces0
Traits2
Classes33
▷ Abstract classes412.12%
▷ Concrete classes2987.88%
▷ Final classes13.45%
Methods297
▷ Static methods3712.46%
▷ Public methods27191.25%
▷ Protected methods248.08%
▷ Private methods20.67%
Functions24
▷ Named functions2083.33%
▷ Anonymous functions416.67%
Constants19
▷ Global constants1578.95%
▷ Class constants421.05%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) trunk/screenshot-1.png23.25KB0.00KB▼ 100.00%
(invalid) trunk/screenshot-2.png68.11KB0.00KB▼ 100.00%