84% easy-cpt-maker

Code Review | Easy CPT Maker

WordPress plugin Easy CPT Maker scored84%from 54 tests.

About plugin

  • Plugin page: easy-cpt-maker
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 29, 2018
  • Latest release: Nov 29, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: codemadan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Easy CPT Maker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.41 ▼4.46
Dashboard /wp-admin3.36 ▲0.0550.72 ▼1.02
Posts /wp-admin/edit.php3.41 ▲0.0551.77 ▼2.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.00 ▲3.89
Media Library /wp-admin/upload.php3.28 ▲0.0535.70 ▼1.25
Add New Custom Post Type /wp-admin/post-new.php?post_type=ecpt_cpt3.3747.64
All Custom Post Types /wp-admin/edit.php?post_type=ecpt_cpt3.3336.64

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Easy CPT Maker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.19 ▼0.291.97 ▼0.0341.07 ▼3.15
Dashboard /wp-admin2,222 ▲515.64 ▲0.1193.00 ▼4.7642.03 ▼4.69
Posts /wp-admin/edit.php2,127 ▲242.00 ▼0.0138.85 ▼4.5036.22 ▼1.31
Add New Post /wp-admin/post-new.php1,391 ▼13916.58 ▼6.56566.26 ▼70.7951.94 ▼4.14
Media Library /wp-admin/upload.php1,427 ▲274.17 ▼0.04102.26 ▼5.7842.01 ▼5.68
Add New Custom Post Type /wp-admin/post-new.php?post_type=ecpt_cpt1,8663.5565.9934.41
All Custom Post Types /wp-admin/edit.php?post_type=ecpt_cpt1,1001.9632.2330.06

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easy-cpt-maker/inc/starter.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-cpt-maker/inc/hooks.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
2 plugin tags: cpt, custom post type

easy-cpt-maker/easy-cptmaker.php 85% from 13 tests

"Easy CPT Maker" version 0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-cpt-maker.php" instead of "easy-cptmaker.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected194 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP51644194

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Constants4
▷ Global constants4100.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
No PNG files were detected