72% custom-field-manager

Code Review | Custom Field Manager

WordPress plugin Custom Field Manager scored 72% from 54 tests.

About plugin

  • Plugin page: custom-field-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 5.8.1
  • First release: Oct 2, 2014
  • Latest release: Mar 16, 2018
  • Number of updates: 10
  • Update frequency: every 126.1 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 7,591 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼144.82ms] Passed 4 tests

Server-side resources used by Custom Field Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.13 ▲0.2938.28 ▲1.90
Dashboard /wp-admin3.41 ▲0.3553.07 ▼11.06
Posts /wp-admin/edit.php3.51 ▲0.3953.65 ▲3.59
Add New Post /wp-admin/post-new.php6.00 ▲0.5694.64 ▼568.66
Media Library /wp-admin/upload.php3.37 ▲0.3633.22 ▼1.47
Custom Fields /wp-admin/admin.php?page=custom-field-manager-customfields3.6234.56
Settings /wp-admin/admin.php?page=custom-field-manager-settings3.3033.52
check /wp-admin/edit-tags.php?taxonomy=check&post_type=book3.3329.20
Book /wp-admin/edit.php?post_type=book3.3632.63
Add New /wp-admin/post-new.php?post_type=book3.5356.37
good /wp-admin/edit-tags.php?taxonomy=good&post_type=book3.3338.53
test /wp-admin/edit-tags.php?taxonomy=test3.3334.41

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 44 new files
Database: 2 new tables, 3 new options
New tables
wp_xyz_cfl_group
wp_xyz_cfl_fields
New WordPress options
xyz_cfl_shortcode_field
xyz_cfl_mandatory_field
xyz_credit_link

Browser metrics Passed 4 tests

Custom Field Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲19816.01 ▲0.507.45 ▼2.3153.80 ▲0.08
Dashboard /wp-admin3,061 ▲1336.13 ▲0.20130.35 ▼43.96172.11 ▲39.62
Posts /wp-admin/edit.php2,856 ▲1172.72 ▲0.0366.30 ▼20.20129.79 ▲26.82
Add New Post /wp-admin/post-new.php1,690 ▲713.92 ▼4.82285.93 ▼105.46142.08 ▲31.80
Media Library /wp-admin/upload.php1,895 ▲915.05 ▲0.04152.24 ▲10.00149.10 ▲22.19
Custom Fields /wp-admin/admin.php?page=custom-field-manager-customfields1,8502.7161.85146.88
Settings /wp-admin/admin.php?page=custom-field-manager-settings1,5212.4654.01141.72
check /wp-admin/edit-tags.php?taxonomy=check&post_type=book1,8272.5464.99107.37
Book /wp-admin/edit.php?post_type=book1,4912.6467.60121.70
Add New /wp-admin/post-new.php?post_type=book3,2409.06233.59185.40
good /wp-admin/edit-tags.php?taxonomy=good&post_type=book1,8392.5263.23117.26
test /wp-admin/edit-tags.php?taxonomy=test1,8272.5363.20109.93

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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • xyz_credit_link

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=custom-field-manager-customfields
    • > Notice in wp-content/plugins/custom-field-manager/admin/manage-cfl.php+844
    Undefined variable: field_group_list
    • > GET request to /wp-admin/admin.php?page=custom-field-manager-customfields
    • > Notice in wp-content/plugins/custom-field-manager/admin/manage-cfl.php+844
    Trying to get property 'id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=custom-field-manager-settings
    • > User deprecated in wp-includes/functions.php+5211
    get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 0% from 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-field-manager/custom-field-manager.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/custom-field-manager/admin/uninstall.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-field-manager/admin/install.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-field-manager/admin/menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-field-manager/admin/save-fields.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-field-manager/ajax-handler.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-field-manager/admin/metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/custom-field-manager/admin/settings.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type() in wp-content/plugins/custom-field-manager/shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/custom-field-manager/admin/manage-cfl.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/custom-field-manager/admin/footer.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt might help

custom-field-manager/custom-field-manager.php 92% from 13 tests

The main file in "Custom Field Manager" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 340 characters long)

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
There were no executable files found in this plugin3,996 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14328183,694
CSS1290290
JavaScript13012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cross.png0.75KB0.65KB▼ 12.83%
admin/images/star.png3.35KB0.83KB▼ 75.35%
admin/images/authenticate.png1.67KB1.30KB▼ 21.76%
admin/images/tick.png0.91KB0.87KB▼ 4.30%
admin/images/delete.png1.19KB1.39KB0.00%