83% show-related-post

Code Review | Show Related Post

WordPress plugin Show Related Post scored83%from 54 tests.

About plugin

  • Plugin page: show-related-post
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2018
  • Latest release: Nov 2, 2022
  • Number of updates: 28
  • Update frequency: every 53.0 days
  • Top authors: mhkanon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,390 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.31ms] Passed 4 tests

This is a short check of server-side resources used by Show Related Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.88 ▲0.31
Dashboard /wp-admin3.45 ▲0.1548.62 ▲0.91
Posts /wp-admin/edit.php3.57 ▲0.2146.01 ▼3.46
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.04 ▼14.62
Media Library /wp-admin/upload.php3.38 ▲0.1537.07 ▲0.53

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Related Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.20 ▼1.391.79 ▲0.0743.34 ▲3.03
Dashboard /wp-admin2,221 ▲355.78 ▲0.8596.52 ▼16.5738.97 ▼3.55
Posts /wp-admin/edit.php2,101 ▲151.99 ▼0.0736.64 ▲0.3333.21 ▼1.38
Add New Post /wp-admin/post-new.php1,545 ▲1222.78 ▼0.42650.49 ▼34.9054.73 ▼3.95
Media Library /wp-admin/upload.php1,400 ▲124.16 ▼0.06102.03 ▲2.3245.27 ▼0.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-related-post/srp_menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/show-related-post/show-related-post.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version not formatted correctly
  • Screenshots: Add an image for screenshot #8 (This is screenshot eight)
You can look at the official readme.txt

show-related-post/show-related-post.php 85% from 13 tests

The main file in "Show Related Post" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,308 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4322511,001
CSS14410306
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/img.png35.08KB5.96KB▼ 83.02%
assets/img/img1.png6.49KB2.30KB▼ 64.47%