68% custom-content-types-by-pixelpillow

Code Review | Custom Content Types by Pixelpillow

WordPress plugin Custom Content Types by Pixelpillow scored68%from 54 tests.

About plugin

  • Plugin page: custom-content-ty...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Dec 10, 2012
  • Latest release: Dec 14, 2012
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: pixelpillow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,327 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.96MB] [CPU: ▼56.33ms] Passed 4 tests

Analyzing server-side resources used by Custom Content Types by Pixelpillow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.66 ▼36.71
Dashboard /wp-admin2.05 ▼1.266.14 ▼49.37
Posts /wp-admin/edit.php2.05 ▼1.316.50 ▼42.49
Add New Post /wp-admin/post-new.php2.05 ▼3.847.22 ▼96.75
Media Library /wp-admin/upload.php2.05 ▼1.184.57 ▼30.06
Content types /wp-admin/edit-tags.php?taxonomy=content_type_post2.055.12

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Content Types by Pixelpillow
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11113.63 ▼0.741.67 ▼0.2044.08 ▲1.00
Dashboard /wp-admin2,252 ▲675.88 ▲1.03108.78 ▲3.2738.57 ▼5.31
Posts /wp-admin/edit.php2,139 ▲502.02 ▲0.0135.53 ▼3.1231.19 ▼3.66
Add New Post /wp-admin/post-new.php6,218 ▲4,67618.99 ▲0.57911.66 ▲271.3059.56 ▲12.91
Media Library /wp-admin/upload.php1,396 ▲174.21 ▼0.1696.08 ▼6.5141.37 ▼3.03
Content types /wp-admin/edit-tags.php?taxonomy=content_type_post1,2952.5035.9535.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the the_tooltip handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=content_type_post
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the the_tooltip handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=content_type_post
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the the_tooltip handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 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
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-types-by-pixelpillow/ajax-methods.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-types-by-pixelpillow/ajax-methods.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-types-by-pixelpillow/taxonomy-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-types-by-pixelpillow/dashboard-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === custom-content-types-by-pixelpillow === )
You can look at the official readme.txt

custom-content-types-by-pixelpillow/pixelpillow-custom-content-types.php 85% from 13 tests

The main PHP script in "Custom Content Types by Pixelpillow" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-content-types-by-pixelpillow.php" instead of "pixelpillow-custom-content-types.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)

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
There were no executable files found in this plugin1,019 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS214405
PHP413130378
LESS1324128
JavaScript418562
PO File1172046

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.75
▷ Minimum class complexity4.00
▷ Maximum class complexity27.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/content-types/event.png2.53KB1.34KB▼ 47.05%
images/content-types/presentation.png2.92KB1.95KB▼ 33.32%
images/add.png0.72KB0.75KB0.00%
images/content-types/audio.png3.72KB2.34KB▼ 37.03%
images/content-types/quote.png2.18KB0.67KB▼ 69.18%