53% simple-post-type

Code Review | Simple Post Type

WordPress plugin Simple Post Type scored 53% from 54 tests.

About plugin

  • Plugin page: simple-post-type
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5.2
  • WordPress version: 5.9.2
  • First release: Jun 8, 2016
  • Latest release: Jun 24, 2016
  • Number of updates: 12
  • Update frequency: every 1.3 days
  • Top authors: yehi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 751 total downloads

Benchmarks

Plugin footprint 48% 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: ▼1.21MB] [CPU: ▼322.91ms] Passed 4 tests

An overview of server-side resources used by Simple Post Type
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0452.99 ▲1.54
Dashboard /wp-admin3.12 ▼0.2820.91 ▼12.76
Posts /wp-admin/edit.php3.12 ▼0.5219.04 ▼19.72
Add New Post /wp-admin/post-new.php3.12 ▼3.8817.81 ▼1,251.39
Media Library /wp-admin/upload.php3.12 ▼0.1716.37 ▼7.75
Post Types /wp-admin/edit.php?post_type=spt3.1218.48
Add ons /wp-admin/edit.php?post_type=spt_add_ons3.1216.18

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: 1 new table, 1 new option
New tables
wp_simple_post_type
New WordPress options
spt_version

Browser metrics Passed 4 tests

Simple Post Type: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲11215.79 ▲0.196.64 ▼0.272.61 ▲0.03
Dashboard /wp-admin2,927 ▲666.11 ▼0.04116.63 ▼16.51155.15 ▼5.28
Posts /wp-admin/edit.php2,723 ▲293.23 ▼0.0067.43 ▲4.44143.38 ▲6.42
Add New Post /wp-admin/post-new.php1,783 ▲6617.45 ▼3.64421.27 ▼41.98160.32 ▲6.34
Media Library /wp-admin/upload.php1,733 ▲325.54 ▲0.01138.31 ▼5.48180.59 ▼0.18
Post Types /wp-admin/edit.php?post_type=spt1,4032.9159.99115.88
Add ons /wp-admin/edit.php?post_type=spt_add_ons280.940.0417.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5316
    add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_simple_post_type
  • This plugin does not fully uninstall, leaving 1 option in the database
    • spt_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=spt_add_ons
    • > User deprecated in wp-includes/functions.php+5316
    add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-post-type/simple-post-type.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=spt_add_ons
    • > Network (severe)
    wp-admin/edit.php?post_type=spt_add_ons - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 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
9 plugin tags: custom post type plugin, posts type, post type, add new post type, custom post type...

simple-post-type/simple-post-type.php Passed 13 tests

This is the main PHP file of "Simple Post Type" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
23 characters long description:
Create custom post type

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
Everything looks great! No dangerous files found in this plugin443 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18025352
PO File137091

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected