78% nelio-related-posts

Code Review | Nelio Related Posts

WordPress plugin Nelio Related Posts scored78%from 54 tests.

About plugin

  • Plugin page: nelio-related-posts
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8
  • WordPress version: 6.3.1
  • First release: Apr 21, 2014
  • Latest release: Apr 25, 2016
  • Number of updates: 25
  • Update frequency: every 46.0 days
  • Top authors: nelio (84%)davilera (20%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.59ms] Passed 4 tests

A check of server-side resources used by Nelio Related Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.25 ▲2.76
Dashboard /wp-admin3.40 ▲0.1049.08 ▲3.57
Posts /wp-admin/edit.php3.52 ▲0.1644.52 ▼9.88
Add New Post /wp-admin/post-new.php6.01 ▲0.1288.23 ▼14.79
Media Library /wp-admin/upload.php3.33 ▲0.1041.99 ▲8.37
Related Posts /wp-admin/themes.php?page=neliosrp-settings3.2733.67

Server storage [IO: ▲0.04MB] [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: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_neliosrp_widget
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nelio Related Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9514.77 ▲0.381.79 ▲0.0745.26 ▲3.61
Dashboard /wp-admin2,234 ▲465.88 ▲0.9897.60 ▼6.4446.61 ▲1.37
Posts /wp-admin/edit.php2,120 ▲282.06 ▲0.0835.89 ▼10.1636.92 ▲2.04
Add New Post /wp-admin/post-new.php6,259 ▲4,71725.95 ▲7.46911.87 ▲302.7261.47 ▲4.02
Media Library /wp-admin/upload.php1,413 ▲254.26 ▲0.04105.80 ▲2.7950.55 ▲5.67
Related Posts /wp-admin/themes.php?page=neliosrp-settings8772.1628.8037.50

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_neliosrp_widget
    • 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
    • > GET request to /wp-admin/themes.php?page=neliosrp-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=neliosrp-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nelio-related-posts/includes/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nelio-related-posts/includes/admin/settings-page.php:172
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-related-posts/template-examples/title-only.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nelio-related-posts/includes/nelio-srp-main.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nelio-related-posts/main.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nelio-related-posts/includes/admin/edit-post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nelio-related-posts/includes/admin/nelioab-campaign.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-related-posts/template-examples/title-and-featured-image.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-related-posts/includes/related-post-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: swiftype, search, cached, related post

nelio-related-posts/main.php 85% from 13 tests

Analyzing the main PHP file in "Nelio Related Posts" version 2.1.1
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("nelio-related-posts.php" instead of "main.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin764 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12135108619
PO File34554144
CSS1001

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.26
Average class complexity10.80
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods620.00%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin