10% category-and-post-tag-related-posts

Code Review | Category and post tag related posts

WordPress plugin Category and post tag related posts scored10%from 54 tests.

About plugin

  • Plugin page: category-and-post...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8+
  • WordPress version: 6.3.1
  • First release: Nov 11, 2012
  • Latest release: Nov 11, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: MrXHellboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,559 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/category-and-post-tag-related-posts/category-and-post-tag-related-posts.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; os_rp_tag_cat has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼48.14ms] Passed 4 tests

Server-side resources used by Category and post tag related posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.179.10 ▼32.06
Dashboard /wp-admin2.31 ▼1.0012.06 ▼39.24
Posts /wp-admin/edit.php2.31 ▼1.059.82 ▼35.36
Add New Post /wp-admin/post-new.php2.31 ▼3.5810.26 ▼85.90
Media Library /wp-admin/upload.php2.31 ▼0.9210.07 ▼23.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_os_rp_tag_cat
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Category and post tag related posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6814.47 ▲0.102.00 ▲0.0145.70 ▲3.40
Dashboard /wp-admin2,200 ▲124.91 ▲0.02163.34 ▲44.8139.98 ▼6.86
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0134.71 ▼1.2231.07 ▼1.74
Add New Post /wp-admin/post-new.php1,542 ▲918.39 ▼5.09587.52 ▼77.6059.90 ▼2.14
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0493.65 ▼8.4240.94 ▼3.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in os_rp_tag_cat is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_os_rp_tag_cat
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 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/category-and-post-tag-related-posts/category-and-post-tag-related-posts.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: post tag, category, widget, single post

category-and-post-tag-related-posts/category-and-post-tag-related-posts.php Passed 13 tests

The main file in "Category and post tag related posts" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Show related posts matching category slugs or names with post tags

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
There were no executable files found in this plugin227 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12432227

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods433.33%
▷ Protected methods00.00%
▷ Private methods866.67%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin