84% the-related-posts

Code Review | The Related Posts

WordPress plugin The Related Posts scored84%from 54 tests.

About plugin

  • Plugin page: the-related-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.6
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Aug 21, 2016
  • Number of updates: 6
  • Update frequency: every 54.8 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.74ms] Passed 4 tests

A check of server-side resources used by The Related Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.69 ▼6.27
Dashboard /wp-admin3.34 ▼0.0145.76 ▼16.42
Posts /wp-admin/edit.php3.39 ▲0.0352.41 ▲4.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.32 ▼21.37
Media Library /wp-admin/upload.php3.26 ▲0.0333.06 ▼2.89
Related Posts /wp-admin/plugins.php?page=alobaidi_related_posts_settings3.2330.82

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

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

Browser metrics Passed 4 tests

The Related Posts: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5814.48 ▲0.191.99 ▼0.0443.16 ▼2.36
Dashboard /wp-admin2,207 ▲195.83 ▲0.95118.66 ▲0.6143.98 ▲0.74
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0140.16 ▲2.8134.66 ▼0.20
Add New Post /wp-admin/post-new.php1,546 ▲3218.17 ▲0.51611.62 ▼78.5349.99 ▼2.00
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0998.68 ▼5.1041.27 ▼3.27
Related Posts /wp-admin/plugins.php?page=alobaidi_related_posts_settings8972.1926.8629.73

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/the-related-posts/settings.php
    • > /wp-content/plugins/the-related-posts/the-related-posts.php
    • > /wp-content/plugins/the-related-posts/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (37 tag instead of maximum 10)
You can look at the official readme.txt

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

The entry point to "The Related Posts" version 1.0.0 is a PHP file that has certain tags in its header comment area
98 characters long description:
Add related posts after content automatically, related posts by tags, full customize, easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected196 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47626196

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin