78% related-post-shortcode

Code Review | Related Post Shortcode

WordPress plugin Related Post Shortcode scored 78% from 54 tests.

About plugin

  • Plugin page: related-post-shor...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Mar 21, 2017
  • Number of updates: 5
  • Update frequency: every 80.8 days
  • Top authors: enguerranws (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,324 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Related Post Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0538.81 ▼2.18
Dashboard /wp-admin3.34 ▲0.0449.03 ▼1.14
Posts /wp-admin/edit.php3.40 ▲0.0447.85 ▲1.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.84 ▼10.81
Media Library /wp-admin/upload.php3.27 ▲0.0434.16 ▲0.10
Related Post Shortcode /wp-admin/options-general.php?page=related-post-shortcode3.2332.53

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Related Post Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.31 ▼1.011.93 ▲0.1642.50 ▼6.98
Dashboard /wp-admin2,212 ▲245.85 ▲1.0199.82 ▼16.2343.83 ▼3.50
Posts /wp-admin/edit.php2,095 ▲92.05 ▲0.0334.93 ▲0.6632.10 ▼6.89
Add New Post /wp-admin/post-new.php1,533 ▼023.08 ▼0.20643.93 ▼26.4654.19 ▼13.89
Media Library /wp-admin/upload.php1,397 ▲124.21 ▲0.0598.50 ▼0.3442.31 ▼0.53
Related Post Shortcode /wp-admin/options-general.php?page=related-post-shortcode8072.0629.5333.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related-post-shortcode/related-post-shortcode.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-post-shortcode/options.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=related-post-shortcode
    • > Network (severe)
    wp-content/plugins/related-post-shortcode/styles.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in related-post-shortcode/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === related-post-shortcode === )
The official readme.txt is a good inspiration

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

The entry point to "Related Post Shortcode" version 1.2 is a PHP file that has certain tags in its header comment area
94 characters long description:
Insert a related article section in your Wordpress content with a new button on TinyMCE editor

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
Good job! No executable or dangerous file extensions detected473 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
HTML1240155
PHP23916138
PO File2203678
JavaScript122153
CSS11047
Markdown1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
related-post-shortcode-editor-icon.png1.21KB0.28KB▼ 76.56%