84% related-tags

Code Review | Related tags

WordPress plugin Related tags scored84%from 54 tests.

About plugin

  • Plugin page: related-tags
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Jan 27, 2015
  • Number of updates: 14
  • Update frequency: every 16.4 days
  • Top authors: sneg55 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,326 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.49ms] Passed 4 tests

Server-side resources used by Related tags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.04 ▼6.60
Dashboard /wp-admin3.32 ▲0.0252.02 ▼3.86
Posts /wp-admin/edit.php3.37 ▲0.0150.02 ▼7.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.06 ▼8.09
Media Library /wp-admin/upload.php3.24 ▲0.0140.12 ▲0.50
Related tags settings /wp-admin/options-general.php?page=count_posts_related_tags3.2130.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Related tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.23 ▼0.131.59 ▼0.3839.63 ▼5.57
Dashboard /wp-admin2,225 ▲285.85 ▼0.0499.66 ▼27.1040.33 ▼5.61
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0537.71 ▼1.8735.45 ▼3.25
Add New Post /wp-admin/post-new.php1,529 ▼1117.67 ▼5.70622.43 ▼60.7469.66 ▲15.43
Media Library /wp-admin/upload.php1,404 ▲44.30 ▲0.0596.58 ▼17.3542.31 ▼7.58
Related tags settings /wp-admin/options-general.php?page=count_posts_related_tags8012.0527.4628.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_related_tags_widget
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/related-tags/RelatedTagsWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/related-tags/RelatedTagsWidget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === related-tags === )
You can look at the official readme.txt

related-tags/related_tags.php 92% from 13 tests

This is the main PHP file of "Related tags" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("related-tags.php" instead of "related_tags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34640186

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin