84% backdrop-post-types

Code Review | Backdrop Post Types

WordPress plugin Backdrop Post Types scored84%from 54 tests.

About plugin

  • Plugin page: backdrop-post-types
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Feb 14, 2023
  • Number of updates: 53
  • Update frequency: every 26.4 days
  • Top authors: benlumia007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼6.53ms] Passed 4 tests

This is a short check of server-side resources used by Backdrop Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3145.11 ▼2.13
Dashboard /wp-admin3.60 ▲0.2954.57 ▲2.19
Posts /wp-admin/edit.php3.65 ▲0.2957.17 ▲6.30
Add New Post /wp-admin/post-new.php6.24 ▲0.3688.33 ▼25.22
Media Library /wp-admin/upload.php3.46 ▲0.2338.08 ▼0.95
New Portfolio /wp-admin/post-new.php?post_type=backdrop-portfolio6.2386.81
Categories /wp-admin/edit-tags.php?taxonomy=backdrop-portfolio-category&post_type=backdrop-portfolio3.4537.99
Portfolio /wp-admin/edit.php?post_type=backdrop-portfolio3.5640.41
Tags /wp-admin/edit-tags.php?taxonomy=backdrop-portfolio-tag&post_type=backdrop-portfolio3.4539.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Backdrop Post Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.75 ▲0.371.76 ▲0.0144.71 ▲2.60
Dashboard /wp-admin2,227 ▲475.53 ▼0.1686.55 ▼5.1238.51 ▼7.48
Posts /wp-admin/edit.php2,135 ▲352.04 ▲0.0538.90 ▲0.0738.65 ▲1.96
Add New Post /wp-admin/post-new.php1,555 ▲1017.95 ▼5.11700.14 ▲57.2077.42 ▲25.78
Media Library /wp-admin/upload.php1,435 ▲324.23 ▲0.0397.32 ▼4.5640.03 ▼5.99
New Portfolio /wp-admin/post-new.php?post_type=backdrop-portfolio6,23322.42866.0430.60
Categories /wp-admin/edit-tags.php?taxonomy=backdrop-portfolio-category&post_type=backdrop-portfolio1,2812.1526.4431.41
Portfolio /wp-admin/edit.php?post_type=backdrop-portfolio1,1351.9932.8530.48
Tags /wp-admin/edit-tags.php?taxonomy=backdrop-portfolio-tag&post_type=backdrop-portfolio1,2812.1726.4030.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Backdrop\\Contracts\\Bootable' not found in wp-content/plugins/backdrop-post-types/vendor/benlumia007/backdrop/src/Core/ServiceProvider.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Backdrop\\booted() in wp-content/plugins/backdrop-post-types/app/framework.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Backdrop\\Core\\ServiceProvider' not found in wp-content/plugins/backdrop-post-types/app/Portfolio/Provider.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Backdrop\\PostTypes\\Portfolio\\add_filter() in wp-content/plugins/backdrop-post-types/app/Portfolio/functions-helpers.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Backdrop\\PostTypes\\Contracts\\Types\\Type' not found in wp-content/plugins/backdrop-post-types/app/Portfolio/Component.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Benlumia007\\Backdrop\\PostTypes\\add_action() in wp-content/plugins/backdrop-post-types/app/functions-setup.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Backdrop\\PostTypes\\Contracts\\Types\\esc_html__() in wp-content/plugins/backdrop-post-types/app/Contracts/Types/Type.php:116
    • > PHP Fatal error
      Uncaught Error: Class 'Backdrop\\Proxies\\Proxy' not found in wp-content/plugins/backdrop-post-types/vendor/benlumia007/backdrop/src/Proxies/App.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Backdrop\\Contracts\\Bootable' not found in wp-content/plugins/backdrop-post-types/app/Contracts/Types/Type.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Backdrop\\Core\\Container' not found in wp-content/plugins/backdrop-post-types/vendor/benlumia007/backdrop/src/Core/Application.php:24

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: post-types

backdrop-post-types/backdrop-post-types.php Passed 13 tests

This is the main PHP file of "Backdrop Post Types" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
A simple way to create custom post type of your choice.

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
Good job! No executable or dangerous file extensions detected1,367 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP273691,2401,116
JSON200135
Markdown3310116

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.73
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces3
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods98
▷ Static methods2323.47%
▷ Public methods7980.61%
▷ Protected methods1717.35%
▷ Private methods22.04%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin