83% just-related

Code Review | Just Related

WordPress plugin Just Related scored83%from 54 tests.

About plugin

  • Plugin page: just-related
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Apr 25, 2015
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: asmsayem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /887 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Just Related
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.77 ▼2.40
Dashboard /wp-admin3.31 ▲0.0145.40 ▼5.06
Posts /wp-admin/edit.php3.36 ▲0.0147.43 ▲4.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.04 ▼7.08
Media Library /wp-admin/upload.php3.23 ▲0.0133.91 ▼1.72

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

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

Browser metrics Passed 4 tests

Just Related: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.31 ▼0.895.25 ▲3.5142.38 ▼2.22
Dashboard /wp-admin2,209 ▲184.88 ▼0.02110.43 ▲3.7443.13 ▲3.84
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0140.41 ▲4.2134.76 ▲0.57
Add New Post /wp-admin/post-new.php1,533 ▲1423.16 ▲0.08640.10 ▼38.6951.49 ▼3.39
Media Library /wp-admin/upload.php1,391 ▲34.29 ▲0.1095.32 ▼13.2440.63 ▼7.23

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/just-related/just-related.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Displaying Related Posts below the post) image not found
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === just-related === )
The official readme.txt might help

just-related/just-related.php Passed 13 tests

The entry point to "Just Related" version 1.0.1 is a PHP file that has certain tags in its header comment area
73 characters long description:
This is a simple plugin to show related posts' list just below your post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172730

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG49.97KB27.40KB▼ 45.17%