77% wp-custom-post-field

Code Review | Wordpress Custom Post Field

WordPress plugin Wordpress Custom Post Field scored 77% from 54 tests.

About plugin

  • Plugin page: wp-custom-post-field
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Jul 16, 2015
  • Number of updates: 14
  • Update frequency: every 19.3 days
  • Top authors: tushal304 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.95ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Custom Post Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.03 ▼8.13
Dashboard /wp-admin3.47 ▲0.1646.17 ▼4.10
Posts /wp-admin/edit.php3.52 ▲0.1653.90 ▲4.56
Add New Post /wp-admin/post-new.php6.05 ▲0.1688.57 ▼14.92
Media Library /wp-admin/upload.php3.39 ▲0.1636.42 ▼0.63
Custom Post /wp-admin/admin.php?page=wcp_main_menu3.3747.76
Add New /wp-admin/admin.php?page=wcp_sub_add_new3.3739.02
Manage Post Types /wp-admin/admin.php?page=wcp_sub_manage_wcp3.3331.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Custom Post Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.23 ▼1.151.87 ▼0.3240.50 ▼6.79
Dashboard /wp-admin2,240 ▲554.86 ▼0.18110.45 ▼7.0739.44 ▼4.20
Posts /wp-admin/edit.php2,126 ▲402.00 ▼0.0635.71 ▼0.6432.68 ▼0.71
Add New Post /wp-admin/post-new.php1,551 ▲923.14 ▲4.80661.90 ▲30.9253.51 ▼0.11
Media Library /wp-admin/upload.php1,422 ▲314.30 ▲0.1099.63 ▼2.9244.58 ▼0.78
Custom Post /wp-admin/admin.php?page=wcp_main_menu8782.0327.3531.62
Add New /wp-admin/admin.php?page=wcp_sub_add_new1,5101.7223.5527.59
Manage Post Types /wp-admin/admin.php?page=wcp_sub_manage_wcp8572.1923.3627.09

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wcp_sub_manage_wcp
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wcp_sub_manage_wcp
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-custom-post-field/custom.php:863

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Create a New custom post type), #2 (Custom post type and taxonomies are added Display in dashbord admin menus), #3 (List Of Wordpress Custom Post type), #4 (Easily add new post in costom type.), #5 (List Of shortcode ,Simple copy shortcode and past in page)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wp-custom-post-field/custom.php 85% from 13 tests

"Wordpress Custom Post Field" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-custom-post-field.php" instead of "custom.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin790 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19562771
CSS10519

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png17.79KB10.86KB▼ 38.92%
screenshot-5.png17.32KB11.35KB▼ 34.43%
screenshot-3.png12.79KB7.58KB▼ 40.75%
screenshot-4.png21.59KB13.01KB▼ 39.74%
screenshot-2.png8.08KB4.65KB▼ 42.50%