83% custom-posttype-listing-block

Code Review | Custom Post Types Listing Block

WordPress plugin Custom Post Types Listing Block scored83%from 54 tests.

About plugin

  • Plugin page: custom-posttype-l...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-5.9.3
  • WordPress version: 6.3.1
  • First release: May 6, 2022
  • Latest release: May 10, 2022
  • Number of updates: 8
  • Update frequency: every 29.8 days
  • Top authors: haritpanchal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.70ms] Passed 4 tests

A check of server-side resources used by Custom Post Types Listing Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.53 ▼4.63
Dashboard /wp-admin3.36 ▲0.0548.80 ▲2.02
Posts /wp-admin/edit.php3.41 ▲0.0543.80 ▼5.05
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.76 ▼2.86
Media Library /wp-admin/upload.php3.28 ▲0.0535.14 ▲1.74

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

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

Browser metrics Passed 4 tests

Custom Post Types Listing Block: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.28 ▼1.081.70 ▼0.1443.33 ▼0.46
Dashboard /wp-admin2,208 ▲375.88 ▲0.93105.73 ▲2.5740.49 ▼9.22
Posts /wp-admin/edit.php2,091 ▲22.01 ▼0.0136.35 ▼2.6432.04 ▼0.98
Add New Post /wp-admin/post-new.php6,365 ▲4,85122.58 ▲5.18881.22 ▲212.0757.16 ▼4.59
Media Library /wp-admin/upload.php1,390 ▼14.22 ▼0.0295.14 ▼4.1139.95 ▼4.39

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-posttype-listing-block/src/blog-listing-data.php:257
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-posttype-listing-block/blog-listing.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Design Panel), #2 (Content Panel), #3 (Pagination Panel), #4 (Number Pagination), #5 (Old/New Pagination)
Please take inspiration from this readme.txt

custom-posttype-listing-block/blog-listing.php 85% from 13 tests

The main PHP script in "Custom Post Types Listing Block" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-posttype-listing-block.php" instead of "blog-listing.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin41,445 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON30039,414
JavaScript41222411,607
PHP31521251
CSS220886
Sass221085
Markdown1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin