78% shortcode-to-display-post-and-user-data

Code Review | Display custom fields in the frontend - Post and User Profile Fields

WordPress plugin Display custom fields in the frontend - Post and User Profile Fields scored78%from 54 tests.

About plugin

  • Plugin page: shortcode-to-disp...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Apr 21, 2023
  • Number of updates: 20
  • Update frequency: every 104.9 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /9,099 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.37ms] Passed 4 tests

This is a short check of server-side resources used by Display custom fields in the frontend - Post and User Profile Fields
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.46 ▼3.64
Dashboard /wp-admin3.32 ▲0.0246.34 ▼0.70
Posts /wp-admin/edit.php3.43 ▲0.0840.63 ▼4.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.58 ▼10.64
Media Library /wp-admin/upload.php3.24 ▲0.0132.78 ▼2.25
Shortcode to display post and user data /wp-admin/admin.php?page=wpdspu_welcome_page3.2528.45
Shortcode to display post and user data /wp-admin/admin.php?page=wpdspu_whats_new3.1828.91

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
wpdspu_welcome_redirect
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Display custom fields in the frontend - Post and User Profile Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.25 ▼1.122.17 ▲0.5043.96 ▲1.46
Dashboard /wp-admin2,206 ▲144.85 ▼0.04111.71 ▲3.4641.82 ▼1.24
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0033.94 ▼0.6433.16 ▲1.06
Add New Post /wp-admin/post-new.php1,522 ▼1123.40 ▲0.27597.61 ▼45.5655.30 ▼5.79
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0593.74 ▼5.2741.36 ▼0.22
Shortcode to display post and user data /wp-admin/admin.php?page=wpdspu_welcome_page7952.0534.4125.87
Shortcode to display post and user data /wp-admin/admin.php?page=wpdspu_whats_new7672.0225.6522.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • wpdspu_welcome_redirect
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpdspu_whats_new
    • > Warning in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php+175
    include(/1.2.1.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wpdspu_whats_new
    • > Warning in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php+175
    include(): Failed opening '/1.2.1.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=wpdspu_whats_new
    • > Notice in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php+177
    Undefined variable: items
    • > GET request to /wp-admin/admin.php?page=wpdspu_whats_new
    • > Warning in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php+193
    include(): Filename cannot be empty
    • > GET request to /wp-admin/admin.php?page=wpdspu_whats_new
    • > Warning in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php+193
    include(): Failed opening '' for inclusion (include_path='.:/usr/share/php')

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/views/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/shortcode-to-display-post-and-user-data/views/welcome-page-content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/samples/email-optin-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/index.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/views/page-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/shortcode-to-display-post-and-user-data/vendor/vg-plugin-sdk/views/settings-form.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: wp page templates, wordpress templates, acf, custom pages, custom fields

shortcode-to-display-post-and-user-data/index.php 92% from 13 tests

"Display custom fields in the frontend - Post and User Profile Fields" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shortcode-to-display-post-and-user-data.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,151 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8174671,103
CSS16048

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity58.33
▷ Minimum class complexity25.00
▷ Maximum class complexity91.00
Average method complexity6.06
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected