84% get-custom-field-values

Code Review | Get Custom Field Values

WordPress plugin Get Custom Field Values scored84%from 54 tests.

About plugin

  • Plugin page: get-custom-field-...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 21, 2004
  • Latest release: Oct 10, 2023
  • Number of updates: 30
  • Update frequency: every 228.9 days
  • Top authors: coffee2code (100%)matt (6.67%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /125,834 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.48ms] Passed 4 tests

Analyzing server-side resources used by Get Custom Field Values
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1639.89 ▼4.25
Dashboard /wp-admin3.46 ▲0.1552.59 ▲2.37
Posts /wp-admin/edit.php3.57 ▲0.2148.26 ▼4.11
Add New Post /wp-admin/post-new.php6.04 ▲0.1582.16 ▼11.91
Media Library /wp-admin/upload.php3.38 ▲0.1536.29 ▲4.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_get-custom
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Get Custom Field Values: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.48 ▲0.182.15 ▼0.0844.13 ▼1.37
Dashboard /wp-admin2,209 ▲275.89 ▲0.0398.20 ▼17.5436.55 ▼9.09
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0436.84 ▼1.0532.23 ▼2.70
Add New Post /wp-admin/post-new.php1,533 ▲1923.17 ▲5.70672.73 ▲51.5446.99 ▼14.48
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0696.71 ▼1.7840.94 ▼4.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_get-custom

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/get-custom-field-values/tests/phpunit/bootstrap.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 require attention:
  • Screenshots: Please describe screenshot #2 in get-custom-field-values/assets to your readme.txt
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

get-custom-field-values/get-custom-field-values.php Passed 13 tests

The entry point to "Get Custom Field Values" version 4.1 is a PHP file that has certain tags in its header comment area
116 characters long description:
Use widgets, shortcodes, and/or template tags to easily retrieve and display custom field values for posts or pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,046 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP94855671,493
Markdown41410513
Bourne Shell16221
XML10014
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.17
▷ Minimum class complexity8.00
▷ Maximum class complexity41.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods140
▷ Static methods53.57%
▷ Public methods13193.57%
▷ Protected methods00.00%
▷ Private methods96.43%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
Constants3
▷ Global constants3100.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