84% dapre-custom-fields-tools

Code Review | Dapre Custom Fields Tools

WordPress plugin Dapre Custom Fields Tools scored 84% from 54 tests.

About plugin

  • Plugin page: dapre-custom-fiel...
  • Plugin version: 5.3.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7.0
  • WordPress version: 6.3.1
  • First release: Mar 18, 2021
  • Latest release: Mar 18, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: daprela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.37ms] Passed 4 tests

Analyzing server-side resources used by Dapre Custom Fields Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.20 ▼1.76
Dashboard /wp-admin3.41 ▲0.1145.72 ▼5.46
Posts /wp-admin/edit.php3.46 ▲0.1142.88 ▼3.85
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.25 ▼6.41
Media Library /wp-admin/upload.php3.27 ▲0.0437.84 ▲6.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
can_compress_scripts
dapre_cft_previous_options
dapre_cft_previous_user_fields
db_upgraded
widget_theysaidso_widget
dapre_cft_previous_post_fields
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dapre Custom Fields Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.23 ▼0.981.73 ▼1.0237.32 ▼2.56
Dashboard /wp-admin2,225 ▲375.06 ▲0.1896.82 ▼4.8339.94 ▼1.76
Posts /wp-admin/edit.php2,105 ▲191.97 ▼0.0333.00 ▼5.1933.06 ▼0.31
Add New Post /wp-admin/post-new.php1,527 ▲817.42 ▼5.68665.34 ▼11.1554.13 ▲1.40
Media Library /wp-admin/upload.php1,404 ▲194.22 ▼0.0293.70 ▼8.3842.08 ▼1.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • dapre_cft_previous_user_fields
    • dapre_cft_previous_post_fields
    • widget_recent-comments
    • widget_recent-posts
    • dapre_cft_previous_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
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
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/tabbed-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-user-fields-rename.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-user-fields-copy.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-post-fields-meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-options-copy.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-user-fields-meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-options-meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-post-fields-copy.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-post-fields-rename.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dapre-custom-fields-tools/templates/partials/box-options-rename.php:1

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: debug, utility, developer

dapre-custom-fields-tools/dapre-custom-fields-tools.php 85% from 13 tests

This is the main PHP file of "Dapre Custom Fields Tools" version 5.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,036 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP256351,3283,022
Markdown12010
CSS2012
JavaScript2012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.42
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods128
▷ Static methods10.78%
▷ Public methods9876.56%
▷ Protected methods2217.19%
▷ Private methods86.25%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin