89% related-posts-by-tags-inventivo

Code Review | Automated Related Posts by Tags | inventivo

WordPress plugin Automated Related Posts by Tags | inventivo scored89%from 54 tests.

About plugin

  • Plugin page: related-posts-by-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Apr 30, 2021
  • Number of updates: 10
  • Update frequency: every 67.4 days
  • Top authors: inventivode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.46ms] Passed 4 tests

An overview of server-side resources used by Automated Related Posts by Tags | inventivo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.75 ▼7.76
Dashboard /wp-admin3.33 ▲0.0348.76 ▼2.35
Posts /wp-admin/edit.php3.38 ▲0.0247.39 ▼4.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.06 ▼19.44
Media Library /wp-admin/upload.php3.25 ▲0.0232.25 ▼6.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Automated Related Posts by Tags | inventivo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.43 ▼0.928.83 ▲7.1939.85 ▼4.54
Dashboard /wp-admin2,183 ▲65.51 ▼0.1487.72 ▼8.6242.03 ▼4.66
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0934.72 ▼1.9535.75 ▲0.76
Add New Post /wp-admin/post-new.php1,536 ▲1018.27 ▼4.74639.67 ▼27.3175.21 ▲14.79
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.03102.95 ▼3.4742.76 ▼2.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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)
There were no browser issues found

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
Attributes that need to be fixed: You can look at the official readme.txt

related-posts-by-tags-inventivo/inventivo-relatedpostsbytags.php 85% from 13 tests

The entry point to "Automated Related Posts by Tags | inventivo" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("related-posts-by-tags-inventivo.php" instead of "inventivo-relatedpostsbytags.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin552 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27391236
PHP13544193
PO File2121254
Sass21036
Markdown126031
CSS2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-256x256-1.png33.55KB11.45KB▼ 65.87%