84% post-category

Code Review | Post Category

WordPress plugin Post Category scored84%from 54 tests.

About plugin

  • Plugin page: post-category
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.5.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Aug 1, 2016
  • Number of updates: 45
  • Update frequency: every 4.6 days
  • Top authors: naples (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /3,106 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.98ms] Passed 4 tests

A check of server-side resources used by Post Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.55 ▼0.15
Dashboard /wp-admin3.40 ▲0.0943.25 ▼1.89
Posts /wp-admin/edit.php3.45 ▲0.0950.33 ▲2.87
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.16 ▼3.02
Media Library /wp-admin/upload.php3.32 ▲0.0934.89 ▲1.13
Posts Category /wp-admin/edit.php?post_type=postcat3.3735.68
Add Post category /wp-admin/post-new.php?post_type=postcat3.3740.26

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Post Category
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.23 ▼0.121.63 ▼0.1538.69 ▼6.11
Dashboard /wp-admin2,225 ▲455.59 ▼0.1192.29 ▲5.4338.50 ▼3.90
Posts /wp-admin/edit.php2,127 ▲302.04 ▲0.0441.34 ▲3.5538.30 ▲5.12
Add New Post /wp-admin/post-new.php1,551 ▲2523.05 ▼0.44638.39 ▼60.5254.26 ▼0.60
Media Library /wp-admin/upload.php1,430 ▲304.17 ▼0.1095.01 ▲1.0641.54 ▼5.23
Posts Category /wp-admin/edit.php?post_type=postcat1,0971.9630.5938.10
Add Post category /wp-admin/post-new.php?post_type=postcat1,6562.5151.5250.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-category/inc/naples_generate.php:295
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-category/inc/naples_register_post.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-category/inc/naples_post_fields.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: loop, category, post, filter

post-category/Post-Category.php 92% from 13 tests

This is the main PHP file of "Post Category" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("post-category.php" instead of "Post-Category.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin670 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5729670

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions5
▷ Named functions5100.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