78% easy-post-types-fields

Code Review | Easy Post Types and Fields

WordPress plugin Easy Post Types and Fields scored78%from 54 tests.

About plugin

  • Plugin page: easy-post-types-f...
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: May 7, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 23
  • Update frequency: every 24.9 days
  • Top authors: Barn2Media (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /6,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▼7.77ms] Passed 4 tests

Server-side resources used by Easy Post Types and Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3339.11 ▼5.26
Dashboard /wp-admin4.20 ▲0.8654.22 ▼9.37
Posts /wp-admin/edit.php4.30 ▲0.9466.45 ▲17.88
Add New Post /wp-admin/post-new.php6.76 ▲0.8794.44 ▼34.31
Media Library /wp-admin/upload.php4.17 ▲0.9359.43 ▲26.28
Manage /wp-admin/admin.php?page=ept_post_types4.33135.89
Protect /wp-admin/admin.php?page=ept_post_types-promo-protect4.1147.76
Display /wp-admin/admin.php?page=ept_post_types-promo-display4.1147.44

Server storage [IO: ▲3.74MB] [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: 154 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Post Types and Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲9414.16 ▼0.551.69 ▼0.3242.55 ▼2.26
Dashboard /wp-admin2,271 ▲915.52 ▼0.1393.68 ▲7.6270.55 ▲30.67
Posts /wp-admin/edit.php2,134 ▲342.03 ▲0.0639.57 ▲1.4234.10 ▲1.24
Add New Post /wp-admin/post-new.php1,556 ▲2523.28 ▲0.01658.77 ▲32.6763.05 ▲10.16
Media Library /wp-admin/upload.php1,434 ▲404.24 ▲0.01109.18 ▲14.9947.64 ▲5.15
Manage /wp-admin/admin.php?page=ept_post_types9501.7025.4236.97
Protect /wp-admin/admin.php?page=ept_post_types-promo-protect9031.7023.4828.44
Display /wp-admin/admin.php?page=ept_post_types-promo-display9061.8226.5527.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 52× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Setup_Wizard\\Interfaces\\Pluggable' not found in wp-content/plugins/easy-post-types-fields/dependencies/barn2/setup-wizard/src/Step.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Setup_Wizard\\Starter' not found in wp-content/plugins/easy-post-types-fields/src/Admin/Wizard/Starter.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Post_Types\\Post_Type_Interface' not found in wp-content/plugins/easy-post-types-fields/src/Post_Types/Abstract_Post_Type.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Lib\\Plugin\\Plugin' not found in wp-content/plugins/easy-post-types-fields/dependencies/barn2/barn2-lib/src/Plugin/Simple_Plugin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Post_Types\\Default_Post_Type' not found in wp-content/plugins/easy-post-types-fields/src/Post_Types/Attachment_Post_Type.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Setup_Wizard\\Setup_Wizard' not found in wp-content/plugins/easy-post-types-fields/src/Admin/Wizard/Wizard.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Setup_Wizard\\Step' not found in wp-content/plugins/easy-post-types-fields/dependencies/barn2/setup-wizard/src/Steps/Welcome_Free.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/easy-post-types-fields/src/Admin/List_Tables/Taxonomy_List_Table.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\WPTRT\\AdminNotices\otices' not found in wp-content/plugins/easy-post-types-fields/dependencies/barn2/barn2-lib/src/Admin/Notices.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Easy_Post_Types_Fields\\Dependencies\\Lib\\Registerable' not found in wp-content/plugins/easy-post-types-fields/dependencies/barn2/barn2-lib/src/Plugin/License/Admin/License_Notices.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ept_post_types-promo-display
    • > Network (severe)
    wp-content/plugins/easy-post-types-fields//assets/images/review.png%22 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ept_post_types-promo-display
    • > Network (severe)
    wp-content/plugins/easy-post-types-fields/lib/assets/js/jquery-tiptip/jquery.tipTip.min.js?ver=1.1.8 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

easy-post-types-fields/easy-post-types-fields.php Passed 13 tests

The principal PHP file in "Easy Post Types and Fields" v. 1.1.8 is loaded by WordPress automatically on each request
48 characters long description:
Create custom post types, fields and taxonomies.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin12,715 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151,1194,9928,333
CSS91521183,754
JavaScript138267555
JSON40073

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.16
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces24
Interfaces20
Traits2
Classes70
▷ Abstract classes68.57%
▷ Concrete classes6491.43%
▷ Final classes11.56%
Methods692
▷ Static methods12317.77%
▷ Public methods58784.83%
▷ Protected methods476.79%
▷ Private methods588.38%
Functions42
▷ Named functions511.90%
▷ Anonymous functions3788.10%
Constants22
▷ Global constants00.00%
▷ Class constants22100.00%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/promo-display.png97.17KB34.29KB▼ 64.71%
assets/images/promo-protect.png118.13KB44.77KB▼ 62.10%
assets/images/review.png16.86KB6.58KB▼ 60.97%