84% cat-post-type

Code Review | Cat Post Type

WordPress plugin Cat Post Type scored84%from 54 tests.

About plugin

  • Plugin page: cat-post-type
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2013
  • Latest release: May 3, 2013
  • Number of updates: 8
  • Update frequency: every 1.5 days
  • Top authors: athos99 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

30+ active /3,386 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼3.84ms] Passed 4 tests

Analyzing server-side resources used by Cat Post Type
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.68 ▼1.25
Dashboard /wp-admin3.31 ▲0.0145.97 ▼1.34
Posts /wp-admin/edit.php3.36 ▲0.0149.13 ▼3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.10 ▼9.42
Media Library /wp-admin/upload.php3.23 ▲0.0039.60 ▲3.48

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Cat Post Type
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.16 ▼1.421.88 ▼0.1239.71 ▼7.25
Dashboard /wp-admin2,221 ▲545.85 ▲0.16112.21 ▲9.2842.54 ▼1.02
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0339.85 ▼1.1234.87 ▼4.54
Add New Post /wp-admin/post-new.php1,545 ▲1922.92 ▲5.40592.86 ▼97.3250.79 ▼7.16
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.02100.92 ▼5.4243.00 ▼0.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cat-post-type/cat-post-type.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cat-post-type/post-css-class.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

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

The main file in "Cat Post Type" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
73 characters long description:
Add the possibility display custom post by selecting tags and categories.

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
Success! There were no dangerous files found in this plugin22 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101622

PHP code Passed 2 tests

A short review 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 code1.14
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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin