79% custom-post-type

Code Review | Custom Post Type

WordPress plugin Custom Post Type scored79%from 54 tests.

About plugin

  • Plugin page: custom-post-type
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Sep 4, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /5,646 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼38.69ms] Passed 4 tests

An overview of server-side resources used by Custom Post Type
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.87 ▼7.56
Dashboard /wp-admin3.01 ▼0.3426.50 ▼37.95
Posts /wp-admin/edit.php3.01 ▼0.3526.22 ▼40.32
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.34 ▼68.91
Media Library /wp-admin/upload.php3.01 ▼0.2228.14 ▼7.24

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Custom Post Type: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.25 ▼0.112.03 ▲0.3643.63 ▼3.66
Dashboard /wp-admin2,212 ▲355.52 ▼0.1486.82 ▼4.3570.68 ▲28.79
Posts /wp-admin/edit.php2,120 ▲171.97 ▼0.0138.60 ▲4.2434.84 ▼1.34
Add New Post /wp-admin/post-new.php1,552 ▲2318.23 ▼5.28746.71 ▲88.6466.69 ▲9.92
Media Library /wp-admin/upload.php1,417 ▲174.06 ▼0.1398.98 ▼1.8477.61 ▲33.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: post, slug, type, custom post type

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

The entry point to "Custom Post Type" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-post-type.php" instead of "main.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
There were no executable files found in this plugin390 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS270196
PHP22414163
JavaScript13031

PHP code Passed 2 tests

An overview of 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.71
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) images/plugin-icon.png91.15KB0.00KB▼ 100.00%