84% related-posts-for-genesis

Code Review | Related Posts For Genesis

WordPress plugin Related Posts For Genesis scored 84% from 54 tests.

About plugin

  • Plugin page: related-posts-for...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2018
  • Latest release: Dec 1, 2020
  • Number of updates: 39
  • Update frequency: every 22.4 days
  • Top authors: raadar (58.97%)websiteguiderteam1618 (43.59%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.10ms] Passed 4 tests

A check of server-side resources used by Related Posts For Genesis
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.52 ▼1.21
Dashboard /wp-admin3.31 ▲0.0050.81 ▼0.34
Posts /wp-admin/edit.php3.36 ▲0.0050.36 ▲5.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.94 ▼3.64
Media Library /wp-admin/upload.php3.23 ▲0.0036.41 ▲0.78

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Related Posts For Genesis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.36 ▼1.044.13 ▲2.5539.52 ▼16.03
Dashboard /wp-admin2,203 ▲155.83 ▼0.0393.67 ▼15.1238.63 ▼3.01
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0038.85 ▲1.1235.02 ▼2.15
Add New Post /wp-admin/post-new.php1,514 ▼2017.77 ▼5.43658.41 ▲22.6354.96 ▼6.68
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0194.47 ▼5.0240.83 ▼4.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/related-posts-for-genesis/admin/customizer.php
    • > /wp-content/plugins/related-posts-for-genesis/lib/related-posts.php
    • > /wp-content/plugins/related-posts-for-genesis/admin/sanitize-callbacks.php
    • > /wp-content/plugins/related-posts-for-genesis/genesis-related.php
    • > /wp-content/plugins/related-posts-for-genesis/lib/plugin-functions.php

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 93% 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:
  • Requires php: Invalid version format
The official readme.txt might help

related-posts-for-genesis/genesis-related.php 92% from 13 tests

"Related Posts For Genesis" version 2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("related-posts-for-genesis.php" instead of "genesis-related.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin403 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP513057265
CSS1220126
JavaScript12412

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected