10% custom-post-type-lockdown

Code Review | Custom Post Type Lockdown WordPress

WordPress plugin Custom Post Type Lockdown WordPress scored10%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 5, 2012
  • Latest release: Feb 10, 2014
  • Number of updates: 6
  • Update frequency: every 71.8 days
  • Top authors: yonisink (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,468 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/custom-post-type-lockdown/CPTLockdown.php+241
    syntax error, unexpected end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.21ms] Passed 4 tests

Server-side resources used by Custom Post Type Lockdown WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.47 ▲6.56
Dashboard /wp-admin3.31 ▼0.0442.92 ▼21.34
Posts /wp-admin/edit.php3.36 ▲0.0047.60 ▲3.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.15 ▼2.31
Media Library /wp-admin/upload.php3.23 ▲0.0034.01 ▼0.52

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Post Type Lockdown WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.66 ▼0.721.81 ▲0.0939.79 ▼7.35
Dashboard /wp-admin2,200 ▲125.83 ▼0.01105.82 ▼9.7438.84 ▼9.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0639.29 ▲2.8234.90 ▲1.37
Add New Post /wp-admin/post-new.php1,533 ▲1423.28 ▲0.16659.81 ▲7.1668.29 ▲12.07
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.05105.83 ▲8.2147.12 ▲4.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/custom-post-type-lockdown/CPTLockdown.php on line 241

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: custom post type, lockout, overwrite, redirect, custom post type archives

custom-post-type-lockdown/CPTLockdown.php 92% from 13 tests

The main file in "Custom Post Type Lockdown WordPress" v. 1.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-post-type-lockdown.php" instead of "CPTLockdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected193 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13513193

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.58
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%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin