89% any-cpt-listing-block

Code Review | Any CPT Listing Block

WordPress plugin Any CPT Listing Block scored89%from 54 tests.

About plugin

  • Plugin page: any-cpt-listing-b...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Sep 6, 2023
  • Number of updates: 10
  • Update frequency: every 47.3 days
  • Top authors: itpathsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /421 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.03MB] [CPU: ▼1.04ms] Passed 4 tests

Analyzing server-side resources used by Any CPT Listing Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.91 ▼1.24
Dashboard /wp-admin3.33 ▲0.0344.06 ▼5.82
Posts /wp-admin/edit.php3.38 ▲0.0347.15 ▲4.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0399.41 ▲6.60
Media Library /wp-admin/upload.php3.25 ▲0.0334.68 ▼1.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Any CPT Listing Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.27 ▼1.104.64 ▲2.7741.14 ▼2.27
Dashboard /wp-admin2,206 ▲154.83 ▼1.07112.08 ▲9.9639.64 ▼0.44
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0639.20 ▲2.0734.56 ▲5.57
Add New Post /wp-admin/post-new.php6,247 ▲4,73319.55 ▲2.02891.49 ▲199.0355.73 ▼1.57
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.09100.29 ▼1.0145.64 ▼1.90

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: post, list, section, grid, gutenberg...

any-cpt-listing-block/any-cpt-listing-block.php 85% from 13 tests

"Any CPT Listing Block" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • 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
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin544 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14066333
CSS1104108
PHP32921103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
build/images/placeholder.5b4e5f67.png100.24KB73.05KB▼ 27.12%