84% tinyrelated

Code Review | tinyRelated

WordPress plugin tinyRelated scored84%from 54 tests.

About plugin

  • Plugin page: tinyrelated
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.0.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Nov 27, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ideag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,146 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.12MB] [CPU: ▼5.23ms] Passed 4 tests

This is a short check of server-side resources used by tinyRelated
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.64 ▲1.40
Dashboard /wp-admin3.44 ▲0.1351.27 ▼5.77
Posts /wp-admin/edit.php3.56 ▲0.1948.96 ▼2.59
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.79 ▼13.96
Media Library /wp-admin/upload.php3.36 ▲0.1337.85 ▲3.78
tinyRelated /wp-admin/options-general.php?page=tinyrelated/includes/options.php3.3334.42

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
tinyrelated_options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_tinyrelated_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for tinyRelated
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.071.48 ▼0.3041.93 ▲0.13
Dashboard /wp-admin2,199 ▲195.63 ▼0.0391.38 ▼2.7240.06 ▼1.53
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0035.12 ▼1.0233.64 ▼4.80
Add New Post /wp-admin/post-new.php6,450 ▲4,92425.82 ▲2.44922.55 ▲227.8454.84 ▲2.28
Media Library /wp-admin/upload.php1,398 ▼24.19 ▼0.02100.61 ▼7.2344.00 ▼1.19
tinyRelated /wp-admin/options-general.php?page=tinyrelated/includes/options.php8412.0023.8425.71

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_tinyrelated_widget

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
Almost there! Just fix the following items
  • 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/tinyrelated/includes/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tinyrelated/tinyrelated.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: related posts, widget, related, shortcode

tinyrelated/tinyrelated.php Passed 13 tests

The main PHP script in "tinyRelated" version 1.0.1 is automatically included on every request by WordPress
39 characters long description:
A tiny and simple related posts plugin.

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
There were no executable files found in this plugin611 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34677549
PO File1213062

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity31.67
▷ Minimum class complexity10.00
▷ Maximum class complexity45.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods2887.50%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 files were detected