80% related-post

Code Review | Related Post

WordPress plugin Related Post scored80%from 54 tests.

About plugin

  • Plugin page: related-post
  • Plugin version: 2.0.55
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 9, 2014
  • Latest release: Dec 2, 2023
  • Number of updates: 155
  • Update frequency: every 21.4 days
  • Top authors: pickplugins (90.32%)paratheme (8.39%)wpkids (2.58%)

Code review

54 tests

User reviews

35 reviews

Install metrics

5,000+ active /152,167 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.76ms] Passed 4 tests

An overview of server-side resources used by Related Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.10 ▼1.28
Dashboard /wp-admin3.37 ▲0.0257.27 ▼3.87
Posts /wp-admin/edit.php3.49 ▲0.1355.11 ▲6.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.19 ▼15.57
Media Library /wp-admin/upload.php3.27 ▲0.0431.80 ▼2.31

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 69 new files
Database: 1 new table, 6 new options
New tables
wp_related_post_stats
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Related Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲22614.41 ▲0.071.77 ▲0.2736.49 ▼1.95
Dashboard /wp-admin2,353 ▲1756.21 ▲0.49120.96 ▲9.3940.83 ▼1.33
Posts /wp-admin/edit.php2,281 ▲1813.33 ▲1.3955.65 ▲16.8835.91 ▲0.21
Add New Post /wp-admin/post-new.php6,273 ▲4,74726.20 ▲3.16794.47 ▲110.2435.63 ▼15.39
Media Library /wp-admin/upload.php1,424 ▲244.18 ▼0.0083.21 ▼14.5044.51 ▲1.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_related_post_stats
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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
Attributes that need to be fixed: You can take inspiration from this readme.txt

related-post/related-post.php Passed 13 tests

"Related Post" version 2.0.55's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
Display related posts under post content on single page and excerpt on archive pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected22,525 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
SVG401211,697
PHP131,8541093,960
CSS61,858593,789
JavaScript46949692,214
PO File2377422854
XML11011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity106.00
▷ Minimum class complexity1.00
▷ Maximum class complexity641.00
Average method complexity15.70
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/front/css/images/arrow-prev.png2.80KB0.13KB▼ 95.30%
assets/front/css/images/arrow-next.png2.81KB0.13KB▼ 95.34%
assets/admin/images/no-thumb.png32.82KB13.55KB▼ 58.71%