84% related-post-slider-block

Code Review | Related Post Slider Block

WordPress plugin Related Post Slider Block scored84%from 54 tests.

About plugin

  • Plugin page: related-post-slid...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2022
  • Latest release: Dec 20, 2022
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: thongtruong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /489 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.68ms] Passed 4 tests

An overview of server-side resources used by Related Post Slider Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.54 ▼2.66
Dashboard /wp-admin3.37 ▲0.0747.67 ▼4.41
Posts /wp-admin/edit.php3.42 ▲0.0651.33 ▲1.90
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.40 ▲0.23
Media Library /wp-admin/upload.php3.29 ▲0.0636.07 ▼3.86

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Related Post Slider Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.34 ▼0.382.31 ▲0.5037.27 ▼5.69
Dashboard /wp-admin2,192 ▲155.62 ▼0.0393.23 ▲2.2541.57 ▲0.57
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0438.90 ▲0.1135.70 ▼1.15
Add New Post /wp-admin/post-new.php6,366 ▲4,83828.11 ▲5.03835.59 ▲136.5749.36 ▼18.84
Media Library /wp-admin/upload.php1,400 ▲34.15 ▼0.00101.33 ▼13.8641.07 ▼3.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related-post-slider-block/related-post-slider-block.php:198

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: related post slider, related post slider block, carousel, slider, dynamic related post slider block...

related-post-slider-block/related-post-slider-block.php Passed 13 tests

The main PHP script in "Related Post Slider Block" version 1.0.2 is automatically included on every request by WordPress
85 characters long description:
A truly WYSIWYG, responsive and dynamic related post carousel slider Gutenberg block.

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
Success! There were no dangerous files found in this plugin324 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON100174
PHP33421145
CSS2103
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.12
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%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin