67% pods

Code Review | Pods - Custom Content Types and Fields

WordPress plugin Pods - Custom Content Types and Fields scored67%from 54 tests.

About plugin

  • Plugin page: pods
  • Plugin version: 3.0.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 8, 2008
  • Latest release: Oct 20, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

399 reviews

Install metrics

100,000+ active /3,690,032 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲9.77MB] [CPU: ▲84.13ms] 50% from 4 tests

An overview of server-side resources used by Pods - Custom Content Types and Fields
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 13.11MB on /wp-admin/admin.php?page=pods-settings)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 9.77MB on /wp-admin/admin.php?page=pods-settings)
PageMemory (MB)CPU Time (ms)
Home /12.71 ▲9.24124.58 ▲83.80
Dashboard /wp-admin14.30 ▲11.00128.36 ▲78.28
Posts /wp-admin/edit.php12.96 ▲9.60137.26 ▲91.35
Add New Post /wp-admin/post-new.php16.38 ▲10.50176.54 ▲86.80
Media Library /wp-admin/upload.php12.96 ▲9.73121.22 ▲87.65
Edit Pods /wp-admin/admin.php?page=pods14.73143.55
Add New /wp-admin/admin.php?page=pods-add-new14.46122.49
Help /wp-admin/admin.php?page=pods-help13.10109.37
- Pod Templates /wp-admin/edit.php?post_type=_pods_template12.96112.40
- Import/Export Packages /wp-admin/admin.php?page=pods-component-migrate-packages13.10117.70
Components /wp-admin/admin.php?page=pods-components14.62130.45
Settings /wp-admin/admin.php?page=pods-settings13.11117.70

Server storage [IO: ▲8.72MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 546 new files
Database: 1 new table, 17 new options
New tables
wp_podsrel
New WordPress options
theysaidso_admin_options
db_upgraded
pods_framework_version_first
can_compress_scripts
pods_framework_db_version
widget_pods_widget_view
pods_framework_version
widget_pods_widget_single
pods_component_settings
wisdom_notification_times
...

Browser metrics Passed 4 tests

An overview of browser requirements for Pods - Custom Content Types and Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲10414.36 ▼0.001.83 ▲0.1640.87 ▲4.49
Dashboard /wp-admin2,271 ▲945.62 ▼0.14103.35 ▲2.3144.73 ▲0.54
Posts /wp-admin/edit.php2,228 ▲12814.40 ▲12.42380.21 ▲345.4531.34 ▼5.25
Add New Post /wp-admin/post-new.php1,531 ▲520.10 ▼2.92661.61 ▼2.7439.12 ▼13.68
Media Library /wp-admin/upload.php1,473 ▲824.25 ▲0.0980.68 ▼14.7242.17 ▲1.62
Edit Pods /wp-admin/admin.php?page=pods1,50715.80271.16162.61
Add New /wp-admin/admin.php?page=pods-add-new1,43113.94216.61101.36
Help /wp-admin/admin.php?page=pods-help1,65613.66158.80161.95
- Pod Templates /wp-admin/edit.php?post_type=_pods_template1,17013.08149.2128.95
- Import/Export Packages /wp-admin/admin.php?page=pods-component-migrate-packages1,15913.12143.29127.70
Components /wp-admin/admin.php?page=pods-components1,70913.06167.6150.56
Settings /wp-admin/admin.php?page=pods-settings1,50915.69195.55139.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_podsrel
  • Zombie WordPress options were found after uninstall: 17 options
    • db_upgraded
    • widget_recent-comments
    • pods_framework_upgraded_1_x
    • pods_framework_db_version
    • can_compress_scripts
    • widget_pods_widget_view
    • widget_pods_widget_form
    • widget_recent-posts
    • pods_framework_version
    • pods_component_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pods/ui/admin/shortcode.php
    • > /wp-content/plugins/pods/components/Templates/includes/element-view_template.php
    • > /wp-content/plugins/pods/ui/front/display/table.php
  • 245× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PodsForm' not found in wp-content/plugins/pods/ui/fields/_comment.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pods/ui/admin/widgets/list.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Pods\\REST\\V1\\Endpoints\\Base' not found in wp-content/plugins/pods/src/Pods/REST/V1/Endpoints/Group.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pods_var() in wp-content/plugins/pods/ui/fields/tinymce.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Pods\\Blocks\\Blocks_Abstract' not found in wp-content/plugins/pods/src/Pods/Blocks/Types/Base.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pods_host_from_url() in wp-content/plugins/pods/ui/admin/help-addons-row.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Pods\\Blocks\\Types\\Item_Single' not found in wp-content/plugins/pods/src/Pods/Blocks/Types/Item_Single_List_Fields.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pods_api() in wp-content/plugins/pods/ui/admin/settings-reset.php:15
    • > PHP Notice
      Undefined variable: form_field_type in wp-content/plugins/pods/ui/fields/datetime.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'PodsField' not found in wp-content/plugins/pods/classes/fields/paragraph.php:6

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: custom taxonomies, pods, block, custom post types, content types...

pods/init.php 92% from 13 tests

Analyzing the main PHP file in "Pods - Custom Content Types and Fields" version 3.0.8
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("pods.php" instead of "init.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected112,548 lines of code in 464 files:
LanguageFilesBlank linesComment linesLines of code
PHP29320,17629,67174,807
JavaScript1436,7354,34135,523
CSS13320841,592
JSON800487
SVG40064
XML210060
SQL10015

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,950)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 325)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity62.12
▷ Minimum class complexity1.00
▷ Maximum class complexity1,950.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity325.00
Code structure
Namespaces28
Interfaces16
Traits0
Classes181
▷ Abstract classes126.63%
▷ Concrete classes16993.37%
▷ Final classes10.59%
Methods2,102
▷ Static methods1808.56%
▷ Public methods1,91591.10%
▷ Protected methods783.71%
▷ Private methods1095.19%
Functions356
▷ Named functions29282.02%
▷ Anonymous functions6417.98%
Constants27
▷ Global constants2177.78%
▷ Class constants622.22%
▷ Public constants6100.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
38 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/Templates/assets/images/white.png3.81KB0.11KB▼ 97.05%
components/Templates/assets/images/icon.png3.81KB0.11KB▼ 97.05%
ui/images/arrow_next.png0.21KB0.22KB0.00%
ui/images/page_white_edit.png0.38KB0.37KB▼ 3.32%
ui/images/smoothness/ui-bg_flat_75_ffffff_40x100.png0.07KB0.08KB0.00%