89% related-posts-flatsome

Code Review | Related Posts Flatsome

WordPress plugin Related Posts Flatsome scored89%from 54 tests.

About plugin

  • Plugin page: related-posts-fla...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 16, 2022
  • Latest release: Aug 22, 2022
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: minhtien94 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /4,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.94ms] Passed 4 tests

This is a short check of server-side resources used by Related Posts Flatsome
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.95 ▲0.47
Dashboard /wp-admin3.31 ▲0.0050.33 ▼5.63
Posts /wp-admin/edit.php3.36 ▲0.0053.78 ▲4.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.73 ▼4.70
Media Library /wp-admin/upload.php3.23 ▲0.0035.69 ▼1.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Related Posts Flatsome
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.27 ▼0.081.79 ▼0.4154.61 ▲9.56
Dashboard /wp-admin2,192 ▲155.56 ▼0.0686.56 ▼3.3140.05 ▼3.25
Posts /wp-admin/edit.php2,103 ▼02.00 ▼0.0640.18 ▲3.6636.53 ▲1.98
Add New Post /wp-admin/post-new.php1,548 ▲1623.30 ▼0.12622.80 ▼65.0955.45 ▼1.46
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.02109.91 ▲1.4446.30 ▼1.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can look at the official readme.txt

related-posts-flatsome/at-related-posts-flatsome.php 85% from 13 tests

Analyzing the main PHP file in "Related Posts Flatsome" version 1.0.1
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("related-posts-flatsome.php" instead of "at-related-posts-flatsome.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected203 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43127203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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
No PNG files were detected