78% clevernode-related-content

Code Review | CleverNode Related Content

WordPress plugin CleverNode Related Content scored78%from 54 tests.

About plugin

  • Plugin page: clevernode-relate...
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2022
  • Latest release: Sep 27, 2023
  • Number of updates: 31
  • Update frequency: every 13.4 days
  • Top authors: metup (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.05MB] [CPU: ▲4.28ms] Passed 4 tests

This is a short check of server-side resources used by CleverNode Related Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0761.70 ▲19.55
Dashboard /wp-admin4.40 ▲1.1058.27 ▲7.79
Posts /wp-admin/edit.php4.45 ▲1.1064.79 ▲11.76
Add New Post /wp-admin/post-new.php6.90 ▲1.01106.38 ▼10.44
Media Library /wp-admin/upload.php4.24 ▲1.0145.44 ▲7.99

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

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

Browser metrics Passed 4 tests

CleverNode Related Content: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,987 ▲22614.53 ▲0.251.78 ▲0.2241.33 ▼0.03
Dashboard /wp-admin2,390 ▲2136.38 ▲0.75120.36 ▲33.8543.43 ▲3.72
Posts /wp-admin/edit.php2,322 ▲2223.56 ▲1.5357.94 ▲17.4338.34 ▲0.95
Add New Post /wp-admin/post-new.php1,564 ▲3822.96 ▼0.08643.35 ▼87.4037.00 ▼16.39
Media Library /wp-admin/upload.php1,464 ▲704.37 ▲0.1583.30 ▼24.5546.48 ▼2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/clevernode-related-content/clevernode-related-content.php
  • 71× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/clevernode-related-content/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/clevernode-related-content/vendor/rbdwllr/reallysimplejwt/tests/Unit/JwtTest.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clevernode-related-content/inc/templates/banner-connect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/clevernode-related-content/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/clevernode-related-content/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/clevernode-related-content/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/clevernode-related-content/vendor/rbdwllr/reallysimplejwt/tests/Unit/Helper/ValidatorTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/clevernode-related-content/vendor/rbdwllr/reallysimplejwt/tests/Integration/BuildParseTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ReallySimpleJWT\\Interfaces\\Validator' not found in wp-content/plugins/clevernode-related-content/vendor/rbdwllr/reallysimplejwt/src/Helper/Validator.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/clevernode-related-content/vendor/rbdwllr/reallysimplejwt/tests/Integration/TokenTest.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: related posts, connected posts, semantic textual similarity, semantic related posts, linked posts...

clevernode-related-content/clevernode-related-content.php 92% from 13 tests

This is the main PHP file of "CleverNode Related Content" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

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
Success! There were no dangerous files found in this plugin21,330 lines of code in 219 files:
LanguageFilesBlank linesComment linesLines of code
PHP1753,3867,68315,142
Markdown191,50204,277
JSON12001,166
CSS2455275
JavaScript35941247
SVG211119
XML21057
YAML37038
make1409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.37
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces27
Interfaces30
Traits5
Classes121
▷ Abstract classes00.00%
▷ Concrete classes121100.00%
▷ Final classes3428.10%
Methods1,150
▷ Static methods15013.04%
▷ Public methods1,02288.87%
▷ Protected methods50.43%
▷ Private methods12310.70%
Functions125
▷ Named functions3427.20%
▷ Anonymous functions9172.80%
Constants75
▷ Global constants00.00%
▷ Class constants75100.00%
▷ Public constants6181.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/logo_clevernode.png4.35KB2.59KB▼ 40.59%