74% instant-post-types

Code Review | Instant Post Types

WordPress plugin Instant Post Types scored74%from 54 tests.

About plugin

  • Plugin page: instant-post-types
  • Plugin version: 0.8.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2020
  • Latest release: Feb 10, 2023
  • Number of updates: 42
  • Update frequency: every 23.2 days
  • Top authors: pluginscorner (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,011 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
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▲5.70ms] Passed 4 tests

Server-side resources used by Instant Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3554.25 ▲2.71
Dashboard /wp-admin3.79 ▲0.4955.63 ▲2.18
Posts /wp-admin/edit.php3.81 ▲0.4658.29 ▲8.67
Add New Post /wp-admin/post-new.php6.26 ▲0.37103.55 ▲9.25
Media Library /wp-admin/upload.php3.65 ▲0.4244.47 ▲10.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 106 new files
Database: 2 new tables, 8 new options
New tables
wp_cpt_pc_custom_post_types
wp_cpt_pc_custom_taxonomies
New WordPress options
widget_recent-comments
widget_recent-posts
CPT_PC_plugin_version
CPT_PC_db_version
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Instant Post Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲18714.95 ▲0.582.92 ▲0.8647.06 ▲2.59
Dashboard /wp-admin2,376 ▲1996.70 ▲1.10130.40 ▲40.5361.96 ▲21.79
Posts /wp-admin/edit.php2,306 ▲2063.67 ▲1.6379.38 ▲33.6091.10 ▲52.83
Add New Post /wp-admin/post-new.php1,687 ▲16122.11 ▼1.40700.33 ▲22.8649.45 ▼14.91
Media Library /wp-admin/upload.php1,583 ▲1834.88 ▲0.69128.83 ▲22.2650.50 ▲4.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_cpt_pc_custom_post_types
    • wp_cpt_pc_custom_taxonomies
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • CPT_PC_db_version
    • CPT_PC_plugin_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/instant-post-types/i18n.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: post, custom taxonomies, cpt, custom post type, custom taxonomy...

instant-post-types/instant-post-types.php Passed 13 tests

The main PHP script in "Instant Post Types" version 0.8.1 is automatically included on every request by WordPress
61 characters long description:
Create custom post types, custom taxonomies and custom fields

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,272 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
Sass408485884,737
CSS4529182,803
PHP385411,1732,730
JavaScript30102

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 complexity12.07
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes320.00%
▷ Concrete classes1280.00%
▷ Final classes00.00%
Methods122
▷ Static methods3528.69%
▷ Public methods9880.33%
▷ Protected methods119.02%
▷ Private methods1310.66%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants228.57%
▷ Class constants571.43%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin