68% easy-custom-post-type

Code Review | Easy Custom Post Type

WordPress plugin Easy Custom Post Type scored68%from 54 tests.

About plugin

  • Plugin page: easy-custom-post-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: May 13, 2020
  • Number of updates: 22
  • Update frequency: every 4.5 days
  • Top authors: desparza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.69MB] [CPU: ▼48.42ms] Passed 4 tests

This is a short check of server-side resources used by Easy Custom Post Type
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.169.99 ▼30.66
Dashboard /wp-admin2.31 ▼0.9912.57 ▼43.78
Posts /wp-admin/edit.php2.31 ▼1.0413.09 ▼36.58
Add New Post /wp-admin/post-new.php2.31 ▼3.5712.66 ▼82.67
Media Library /wp-admin/upload.php2.31 ▼0.9212.53 ▼26.47
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu2.3112.48
Easy Custom Post Type /wp-admin/admin.php?page=my-custom-post-type-settings2.3114.85

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Custom Post Type
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.25 ▼0.111.97 ▲0.3144.14 ▼5.40
Dashboard /wp-admin2,223 ▲525.62 ▲0.0492.48 ▼8.5348.54 ▲2.13
Posts /wp-admin/edit.php2,125 ▲252.02 ▲0.0639.83 ▲2.8740.18 ▲4.20
Add New Post /wp-admin/post-new.php1,550 ▲2223.34 ▲0.40603.52 ▼64.3755.65 ▲9.34
Media Library /wp-admin/upload.php1,428 ▲284.25 ▲0.0499.29 ▲1.0544.61 ▼0.45
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu8351.9926.1128.33
Easy Custom Post Type /wp-admin/admin.php?page=my-custom-post-type-settings9561.9923.6730.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function register_post_type was called incorrectly. Post type names must be between 1 and 20 characters in length. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=my-custom-post-type-settings
    • > User notice in wp-includes/functions.php+5905
    Function register_post_type was called incorrectly. Post type names must be between 1 and 20 characters in length. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.)

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-custom-post-type/wp-easy-custom-post-type.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

easy-custom-post-type/wp-easy-custom-post-type.php 85% from 13 tests

The entry point to "Easy Custom Post Type" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 239 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-custom-post-type.php" instead of "wp-easy-custom-post-type.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin245 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24432237
CSS3298

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/default.png4.15KB2.12KB▼ 48.92%