77% custom-field-template

Code Review | Custom Field Template

WordPress plugin Custom Field Template scored77%from 54 tests.

About plugin

  • Plugin page: custom-field-temp...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 4, 2008
  • Latest release: Jul 27, 2023
  • Number of updates: 372
  • Update frequency: every 14.6 days
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

50,000+ active /1,087,889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼9.41ms] Passed 4 tests

Server-side resources used by Custom Field Template
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.61 ▼2.24
Dashboard /wp-admin3.35 ▲0.0551.56 ▼0.11
Posts /wp-admin/edit.php3.41 ▲0.0554.03 ▲3.33
Add New Post /wp-admin/post-new.php5.19 ▼0.7068.93 ▼33.36
Media Library /wp-admin/upload.php3.28 ▲0.0535.33 ▼1.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 116 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Field Template
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.63 ▼0.641.72 ▼0.0644.18 ▼0.51
Dashboard /wp-admin2,238 ▲475.86 ▲0.98105.74 ▲0.1540.13 ▼3.33
Posts /wp-admin/edit.php2,166 ▲772.14 ▲0.1041.08 ▲3.2934.48 ▲0.68
Add New Post /wp-admin/post-new.php6,236 ▲4,70826.22 ▲2.94905.29 ▲229.4361.92 ▲2.49
Media Library /wp-admin/upload.php1,431 ▲434.30 ▲0.09101.37 ▼0.4642.99 ▼2.12
Custom Field Template /wp-admin/custom-field-template.php260.440.0712.73

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-field-template/custom-field-template.php:40

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/custom-field-template.php
    • > Network (severe)
    wp-admin/custom-field-template.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

custom-field-template/custom-field-template.php 85% from 13 tests

The principal PHP file in "Custom Field Template" v. 2.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")
  • Domain Path: The domain path should be prefixed with a forward slash character ("//")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected12,591 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript695571,6104,457
PO File201,9402,7524,180
PHP14701303,819
CSS163135

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,275)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 162)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity1,275.00
▷ Minimum class complexity1,275.00
▷ Maximum class complexity1,275.00
Average method complexity21.55
▷ Minimum method complexity1.00
▷ Maximum method complexity162.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/calendar.png0.47KB0.57KB0.00%
js/grippie.png0.16KB0.10KB▼ 34.57%