84% text-to-custom-field

Code Review | Text to Custom Field

WordPress plugin Text to Custom Field scored84%from 54 tests.

About plugin

  • Plugin page: text-to-custom-field
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.3.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2012
  • Latest release: Apr 26, 2012
  • Number of updates: 6
  • Update frequency: every 6.3 days
  • Top authors: WPReady (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,553 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.46ms] Passed 4 tests

A check of server-side resources used by Text to Custom Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.11 ▼0.89
Dashboard /wp-admin3.31 ▲0.0056.38 ▲4.09
Posts /wp-admin/edit.php3.36 ▲0.0051.32 ▲0.95
Add New Post /wp-admin/post-new.php5.89 ▲0.00103.23 ▲1.80
Media Library /wp-admin/upload.php3.23 ▲0.0031.26 ▼3.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Text to Custom Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▲0.191.65 ▼0.3438.60 ▼4.80
Dashboard /wp-admin2,198 ▲175.62 ▼0.1287.06 ▼14.8639.03 ▼7.43
Posts /wp-admin/edit.php2,100 ▲32.12 ▲0.1334.14 ▼2.3037.83 ▲1.33
Add New Post /wp-admin/post-new.php1,545 ▲1923.07 ▲5.53612.41 ▼9.5948.49 ▲0.32
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.01103.12 ▼11.0042.69 ▼5.44

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-to-custom-field/plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: custom field, field, xmlrpc, post

text-to-custom-field/plugin.php 92% from 13 tests

The primary PHP file in "Text to Custom Field" version 1.11 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("text-to-custom-field.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1102023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.80KB22.13KB▼ 55.55%