10% acpt-lite

Code Review | Custom post types for Wordpress – ACPT Lite

WordPress plugin Custom post types for Wordpress – ACPT Lite scored 10% from 54 tests.

About plugin

  • Plugin page: acpt-lite
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 5.9.2
  • First release: Dec 1, 2021
  • Latest release: Mar 1, 2022
  • Number of updates: 16
  • Update frequency: every 5.6 days
  • Top authors: mauretto1978 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 464 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/acpt-lite/src/Includes/ACPT_Lite_DB.php+181
    Undefined property: WP_Post_Type::$custom_rewrite

Server metrics [RAM: ▲1.10MB] [CPU: ▼296.03ms] Passed 4 tests

An overview of server-side resources used by Custom post types for Wordpress – ACPT Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.90 ▲1.3969.31 ▲19.69
Dashboard /wp-admin4.77 ▲1.3744.98 ▲10.48
Posts /wp-admin/edit.php4.98 ▲1.3451.00 ▲10.73
Add New Post /wp-admin/post-new.php7.29 ▲0.3277.77 ▼1,213.72
Media Library /wp-admin/upload.php4.73 ▲1.4340.64 ▲8.38
ACPT Lite /wp-admin/admin.php?page=advanced-custom-post-type-lite4.6634.97

Server storage [IO: ▲5.05MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 362 new files
Database: 13 new tables, no new options
New tables
acpt_custom_post_type_field
acpt_taxonomy
acpt_settings
acpt_taxonomy_pivot
acpt_custom_post_type_relation
acpt_custom_post_type_import
acpt_woocommerce_product_data
acpt_custom_post_type
acpt_woocommerce_product_data_field
acpt_custom_post_template
...

Browser metrics Passed 4 tests

Custom post types for Wordpress – ACPT Lite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,872 ▲13015.85 ▲0.155.66 ▼0.052.06 ▼0.10
Dashboard /wp-admin2,984 ▲1236.10 ▼0.07116.31 ▼20.15166.94 ▲9.67
Posts /wp-admin/edit.php2,751 ▲573.25 ▲0.0268.42 ▲5.74145.71 ▲8.04
Add New Post /wp-admin/post-new.php1,843 ▲9123.15 ▲1.34427.54 ▲3.97167.10 ▲12.18
Media Library /wp-admin/upload.php1,790 ▲955.51 ▼0.02122.81 ▼13.58199.13 ▲7.64
Register post type /wp-admin/admin.php?page=advanced-custom-post-type-lite#/register1,8926.95210.67169.64
ACPT Lite /wp-admin/admin.php?page=advanced-custom-post-type-lite1,4085.99220.21144.69
Settings /wp-admin/admin.php?page=advanced-custom-post-type-lite#/settings1,2225.78112.53134.23
Registered taxonomies /wp-admin/admin.php?page=advanced-custom-post-type-lite#/taxonomies1,3246.44101.83145.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method ACPT_Lite::deactivate() should not be called statically

Smoke tests 25% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/acpt-lite/admin/templates/app.php
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Models\\AbstractModel' not found in wp-content/plugins/acpt-lite/src/Core/Models/CustomPostTypeModel.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Models\\AbstractModel' not found in wp-content/plugins/acpt-lite/src/Core/Models/SettingsModel.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Shortcodes\\Fields\\AbstractField' not found in wp-content/plugins/acpt-lite/src/Core/Shortcodes/Fields/TextField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Generators\\Fields\\AbstractField' not found in wp-content/plugins/acpt-lite/src/Core/Generators/Fields/SelectField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Shortcodes\\Fields\\AbstractField' not found in wp-content/plugins/acpt-lite/src/Core/Shortcodes/Fields/SelectField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Models\\AbstractModel' not found in wp-content/plugins/acpt-lite/src/Core/Models/WooCommerceProductDataModel.php:15
    • > PHP Fatal error
      Trait 'Webmozart\\Assert\\Mixin' not found in wp-content/plugins/acpt-lite/vendor/webmozart/assert/src/Assert.php on line 33
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Generators\\Fields\\AbstractField' not found in wp-content/plugins/acpt-lite/src/Core/Generators/Fields/EmailField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Base_Data_Control' not found in wp-content/plugins/acpt-lite/src/Core/Generators/Elementor/Controls/ShortcodeControl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ACPT_Lite\\Core\\Models\\AbstractModel' not found in wp-content/plugins/acpt-lite/src/Core/Models/FileImportModel.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=advanced-custom-post-type-lite
    • > Intervention (severe) in unknown
    /wp-admin/admin.php?page=advanced-custom-post-type-lite#/register - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #7 (Elementor integration) image required
You can look at the official readme.txt

acpt-lite/advanced-custom-post-type-lite.php 77% from 13 tests

The main file in "Custom post types for Wordpress – ACPT Lite" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/advanced-custom-post-type")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acpt-lite.php" instead of "advanced-custom-post-type-lite.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin31,616 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
PHP792,3377,28112,270
HTML323984935,444
JavaScript721,1852,4145,018
CSS15701974,006
Handlebars45507942,236
JSON12301,006
Sass17400991830
Markdown62610671
YAML2331101
XML21029
SVG1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity21.04
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces16
Interfaces1
Traits1
Classes65
▷ Abstract classes57.69%
▷ Concrete classes6092.31%
▷ Final classes11.67%
Methods902
▷ Static methods49354.66%
▷ Public methods80288.91%
▷ Protected methods272.99%
▷ Private methods738.09%
Functions34
▷ Named functions2573.53%
▷ Anonymous functions926.47%
Constants36
▷ Global constants25.56%
▷ Class constants3494.44%
▷ Public constants34100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
35 PNG files occupy 1.44MB with 1.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/owl.carousel/docs_src/assets/img/feature-drag.png8.18KB2.08KB▼ 74.56%
assets/vendor/owl.carousel/docs_src/assets/img/feature-responsive.png7.36KB2.08KB▼ 71.75%
assets/vendor/owl.carousel/docs/assets/img/bird_blue_32.png1.32KB0.33KB▼ 75.15%
assets/vendor/owl.carousel/docs_src/assets/img/owl-logo.png13.38KB4.10KB▼ 69.35%
assets/vendor/owl.carousel/docs/assets/img/feature-zombie.png9.44KB2.73KB▼ 71.10%