84% relate-it

Code Review | Relate-it

WordPress plugin Relate-it scored84%from 54 tests.

About plugin

  • Plugin page: relate-it
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: Oct 4, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bachiller (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.56ms] Passed 4 tests

This is a short check of server-side resources used by Relate-it
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.51 ▲0.03
Dashboard /wp-admin3.34 ▲0.0450.77 ▲0.36
Posts /wp-admin/edit.php3.39 ▲0.0353.34 ▲3.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.49 ▼20.45
Media Library /wp-admin/upload.php3.27 ▲0.0338.47 ▲1.84
Relate-it plugin /wp-admin/options-general.php?page=RelateIt_settings_menu3.2337.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Relate-it
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.112.33 ▲0.5745.39 ▲4.98
Dashboard /wp-admin2,199 ▲195.64 ▼0.0292.97 ▼7.8943.16 ▼0.35
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0534.79 ▼2.3833.03 ▼2.21
Add New Post /wp-admin/post-new.php1,529 ▲323.52 ▲0.48687.33 ▲19.9160.52 ▲2.26
Media Library /wp-admin/upload.php1,398 ▼24.20 ▲0.03101.78 ▲0.7445.68 ▲0.87
Relate-it plugin /wp-admin/options-general.php?page=RelateIt_settings_menu8002.0025.2024.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/relate-it/relate-it.php:294

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin in action (below post and over comments) with default style), #2 (Settings form in the admin section)
The official readme.txt is a good inspiration

relate-it/relate-it.php Passed 13 tests

Analyzing the main PHP file in "Relate-it" version 1.0
98 characters long description:
A plugin that shows a thumbnail of related posts from the actual post based on different criteria.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin140 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP155110133
CSS1107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png35.10KB15.04KB▼ 57.16%
screenshot-1.png208.52KB81.01KB▼ 61.15%