10% pro-related-post-widget

Code Review | Pro Related Post Widget

WordPress plugin Pro Related Post Widget scored10%from 54 tests.

About plugin

  • Plugin page: pro-related-post-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Dec 22, 2015
  • Number of updates: 9
  • Update frequency: every 94.1 days
  • Top authors: shambhu patnaik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,431 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/pro-related-post-widget/pro-related-post-widget.php+140
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.22ms] Passed 4 tests

Server-side resources used by Pro Related Post Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.63 ▼30.76
Dashboard /wp-admin2.10 ▼1.215.46 ▼42.99
Posts /wp-admin/edit.php2.10 ▼1.265.51 ▼43.49
Add New Post /wp-admin/post-new.php2.10 ▼3.795.41 ▼91.64
Media Library /wp-admin/upload.php2.10 ▼1.136.04 ▼26.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_pro_related_post
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pro Related Post Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.441.72 ▲0.0643.98 ▼0.80
Dashboard /wp-admin2,209 ▲185.86 ▲0.94107.48 ▲4.0338.42 ▼7.26
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0137.53 ▼0.4833.44 ▼2.43
Add New Post /wp-admin/post-new.php1,530 ▼323.51 ▲0.53660.72 ▲3.8359.89 ▲5.16
Media Library /wp-admin/upload.php1,385 ▼64.21 ▲0.0294.30 ▼9.3139.97 ▼5.19

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/pro-related-post-widget/pro-related-post-widget.php+140
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_pro_related_post

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pro-related-post-widget/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pro-related-post-widget/pro-related-post-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: related post, widget, related posts widget, advanced related posts widget, pro related post widget

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

The main PHP script in "Pro Related Post Widget" version 1.0 is automatically included on every request by WordPress
81 characters long description:
Pro Related Post Widget plugin.dynamically show related post according to post.

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
Success! There were no dangerous files found in this plugin105 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2646105

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.85KB3.29KB▼ 43.64%