10% smart-related-posts

Code Review | Smart Related Posts

WordPress plugin Smart Related Posts scored10%from 54 tests.

About plugin

  • Plugin page: smart-related-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 21, 2015
  • Latest release: Apr 22, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: PedroEscudero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /615 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wordpress_smart_related_post::activation() should not be called statically

Server metrics [RAM: ▼0.30MB] [CPU: ▼15.53ms] Passed 4 tests

Server-side resources used by Smart Related Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0040.34 ▼3.73
Dashboard /wp-admin3.34 ▲0.0347.23 ▼3.67
Posts /wp-admin/edit.php3.39 ▲0.0350.79 ▼1.37
Add New Post /wp-admin/post-new.php4.63 ▼1.2644.58 ▼53.34
Media Library /wp-admin/upload.php3.26 ▲0.0337.62 ▲0.64
Wordpress Smart Related Post /wp-admin/options-general.php?page=wordpress_smart_related_post3.2030.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Smart Related Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,703 ▼4314.46 ▲0.091.33 ▼0.6331.17 ▼14.47
Dashboard /wp-admin2,212 ▲244.84 ▼0.06120.33 ▲18.4452.61 ▲9.11
Posts /wp-admin/edit.php2,077 ▼152.17 ▲0.1540.67 ▼3.1838.02 ▲0.92
Add New Post /wp-admin/post-new.php47 ▼1,4950.44 ▼17.770.06 ▼628.4714.60 ▼41.44
Media Library /wp-admin/upload.php1,394 ▲34.19 ▲0.0198.13 ▼3.1761.98 ▲15.80
Wordpress Smart Related Post /wp-admin/options-general.php?page=wordpress_smart_related_post7762.0326.0828.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wordpress_smart_related_post::deactivation() should not be called statically
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wordpress_smart_related_post
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wordpress_smart_related_post
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/smart-related-posts/smart-related-posts.php:27

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === smart-related-posts === )
You can look at the official readme.txt

smart-related-posts/smart-related-posts.php 92% from 13 tests

This is the main PHP file of "Smart Related Posts" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin140 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14748112
CSS11028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin