83% extended-custom-post

Code Review | Wp extended Post type

WordPress plugin Wp extended Post type scored83%from 54 tests.

About plugin

  • Plugin page: extended-custom-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Apr 27, 2022
  • Latest release: Apr 27, 2022
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: appgenixinfortech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.46MB] [CPU: ▼14.63ms] Passed 4 tests

Server-side resources used by Wp extended Post type
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2344.60 ▼1.13
Dashboard /wp-admin3.54 ▲0.1949.13 ▼6.38
Posts /wp-admin/edit.php3.59 ▲0.2347.41 ▼0.97
Add New Post /wp-admin/post-new.php3.39 ▼2.5036.08 ▼50.02
Media Library /wp-admin/upload.php3.47 ▲0.2336.13 ▲0.18
Add/Edit CPT /wp-admin/edit.php?post_type=wp_extended3.5135.26
Add/Edit Custom Field /wp-admin/edit.php?post_type=wp_extended_meta3.5134.08
Add/Edit Taxonomy /wp-admin/edit.php?post_type=wp_extended_tax3.5135.87

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Wp extended Post type
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.64 ▼0.766.25 ▲4.0343.05 ▼7.94
Dashboard /wp-admin2,244 ▲564.98 ▼0.91106.22 ▼0.6343.70 ▲0.43
Posts /wp-admin/edit.php2,130 ▲382.12 ▲0.0940.67 ▼0.8035.05 ▼1.65
Add New Post /wp-admin/post-new.php1,550 ▲823.30 ▲4.74659.15 ▼9.2249.06 ▼7.30
Media Library /wp-admin/upload.php1,426 ▲414.32 ▲0.02100.09 ▲0.4042.34 ▼4.29
Add/Edit CPT /wp-admin/edit.php?post_type=wp_extended1,0912.0437.4929.22
Add/Edit Custom Field /wp-admin/edit.php?post_type=wp_extended_meta1,0942.0934.0030.67
Add/Edit Taxonomy /wp-admin/edit.php?post_type=wp_extended_tax1,0942.0435.2232.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/extended-custom-post/admin/views/admin-meta-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extended-custom-post/admin/views/cpt.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Admin Cutom Fields settings for custom post type. (assets/Screenshot_1.png)), #2 (Generated PostType and custom metaboxes. (assets/screenshot_2.png))
The official readme.txt might help

extended-custom-post/extended-custom-post.php 85% from 13 tests

This is the main PHP file of "Wp extended Post type" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.1" instead of "4.4")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.4" instead of "7.0")

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
No dangerous file extensions were detected3,102 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript461251,231
PHP9139681,109
CSS3944762

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.94
Average class complexity9.00
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot_2.png104.72KB48.04KB▼ 54.13%
assets/Screenshot_1.png63.65KB29.90KB▼ 53.03%