84% softmixt-relations

Code Review | Softmixt Relations

WordPress plugin Softmixt Relations scored84%from 54 tests.

About plugin

  • Plugin page: softmixt-relations
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Jul 2, 2017
  • Latest release: May 8, 2018
  • Number of updates: 31
  • Update frequency: every 10.0 days
  • Top authors: softmixt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /605 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Softmixt Relations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.49 ▼4.00
Dashboard /wp-admin3.32 ▲0.0242.61 ▼7.09
Posts /wp-admin/edit.php3.44 ▲0.0847.05 ▲2.11
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.20 ▼15.35
Media Library /wp-admin/upload.php3.25 ▲0.0234.10 ▼0.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_sft_defaultwidget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Softmixt Relations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.62 ▼1.061.76 ▼0.0741.92 ▼1.44
Dashboard /wp-admin2,206 ▲185.76 ▼0.16108.73 ▼11.7143.28 ▼5.55
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0838.79 ▲0.4736.39 ▲0.93
Add New Post /wp-admin/post-new.php6,322 ▲4,80126.19 ▲2.82912.10 ▲289.9370.73 ▲19.23
Media Library /wp-admin/upload.php1,382 ▼04.25 ▲0.0498.76 ▲0.4143.02 ▼2.63

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_sft_defaultwidget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/softmixt-relations/admin/views/softmixt-relations-mb-view.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/softmixt-relations/widgets/default/SFT_DefaultWidget.php:3

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #7, #8, #9 in softmixt-relations/assets to your readme.txt
The official readme.txt is a good inspiration

softmixt-relations/softmixt-relations.php Passed 13 tests

The entry point to "Softmixt Relations" version 2.0.0 is a PHP file that has certain tags in its header comment area
37 characters long description:
Simple way for adding related posts .

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 detected1,129 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9121186624
JavaScript45981413
CSS117792

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.33
▷ Minimum class complexity13.00
▷ Maximum class complexity60.00
Average method complexity7.29
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants1
▷ Global constants1100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/tinymce/plugins/sftrelations/sftrelations.png0.32KB0.33KB0.00%