83% gou-manage-related-posts-similar-posts

Code Review | Gou Manage Related Posts | Similar Posts

WordPress plugin Gou Manage Related Posts | Similar Posts scored83%from 54 tests.

About plugin

  • Plugin page: gou-manage-relate...
  • Plugin version: 3.7.9.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2021
  • Latest release: Oct 22, 2023
  • Number of updates: 68
  • Update frequency: every 10.5 days
  • Top authors: aslamkhangouran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.44ms] Passed 4 tests

This is a short check of server-side resources used by Gou Manage Related Posts | Similar Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.85 ▼2.22
Dashboard /wp-admin3.41 ▲0.1047.97 ▼2.19
Posts /wp-admin/edit.php3.52 ▲0.1648.14 ▲1.15
Add New Post /wp-admin/post-new.php5.99 ▲0.1097.16 ▲6.44
Media Library /wp-admin/upload.php3.33 ▲0.1035.77 ▲1.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Gou Manage Related Posts | Similar Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.25 ▼0.371.81 ▲0.1142.44 ▼0.21
Dashboard /wp-admin2,211 ▲345.64 ▲0.0591.33 ▲0.9642.59 ▼1.54
Posts /wp-admin/edit.php2,116 ▲132.01 ▲0.0539.35 ▲5.1835.69 ▲6.80
Add New Post /wp-admin/post-new.php1,548 ▲2218.63 ▼4.81588.87 ▼133.9261.77 ▲6.71
Media Library /wp-admin/upload.php1,419 ▲194.16 ▲0.0393.24 ▼9.2445.90 ▼0.41

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gou-manage-related-posts-similar-posts/admin/grp-need-help-popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/gou-manage-related-posts-similar-posts/admin/grp-admin-setting-forms.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-manage-related-posts-similar-posts/admin/grp-admin-general-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gou-manage-related-posts-similar-posts/gou-related-posts.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-manage-related-posts-similar-posts/admin/grp-admin-configuration-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: related, similar posts, related posts, posts, related post...

gou-manage-related-posts-similar-posts/gou-related-posts.php 77% from 13 tests

The main PHP script in "Gou Manage Related Posts | Similar Posts" version 3.7.9.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gou-manage-related-posts-similar-posts.php" instead of "gou-related-posts.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,806 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11804501,182
CSS210812456
JavaScript111410167
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.00
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods27
▷ Static methods2488.89%
▷ Public methods2488.89%
▷ Protected methods00.00%
▷ Private methods311.11%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/x.png1.17KB1.10KB▼ 5.84%
admin/images/ui-icons_222222_256x240.png6.86KB4.18KB▼ 39.05%
images/x.png1.17KB1.10KB▼ 5.84%