84% auto-assign-post-category

Code Review | Auto Assign Post Category

WordPress plugin Auto Assign Post Category scored84%from 54 tests.

About plugin

  • Plugin page: auto-assign-post-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Dec 24, 2020
  • Number of updates: 7
  • Update frequency: every 238.2 days
  • Top authors: kiranpatil353 (85.71%)clarionwpdeveloper (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.04ms] Passed 4 tests

A check of server-side resources used by Auto Assign Post Category
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.03 ▲0.19
Dashboard /wp-admin3.35 ▲0.0444.77 ▼5.24
Posts /wp-admin/edit.php3.40 ▲0.0445.41 ▼0.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.85 ▼14.13
Media Library /wp-admin/upload.php3.27 ▲0.0436.56 ▲3.34
Assign New /wp-admin/admin.php?page=mapnew_categories3.2532.56
Auto Category Tag /wp-admin/admin.php?page=category-mapping3.2428.19

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: 3 new files
Database: 1 new table, 6 new options
New tables
wp_tag_category_mapping
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Assign Post Category
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.23 ▼1.171.83 ▲0.2036.79 ▼1.08
Dashboard /wp-admin2,235 ▲474.83 ▼0.0597.87 ▼13.1940.04 ▼2.47
Posts /wp-admin/edit.php2,118 ▲292.01 ▲0.0133.72 ▼8.5735.14 ▲0.30
Add New Post /wp-admin/post-new.php1,561 ▲4418.58 ▲1.06613.75 ▼0.5950.40 ▼0.09
Media Library /wp-admin/upload.php1,417 ▲324.23 ▲0.0198.20 ▼4.9240.85 ▼2.65
Assign New /wp-admin/admin.php?page=mapnew_categories8272.0625.6824.84
Auto Category Tag /wp-admin/admin.php?page=category-mapping8022.0325.4624.05

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-assign-post-category/index.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were 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
7 plugin tags: assign category to post, auto category, auto assign post category, assign category, post category...

auto-assign-post-category/index.php 92% from 13 tests

The main file in "Auto Assign Post Category" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("auto-assign-post-category.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin192 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14729186
JavaScript1106

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.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
No PNG images were found in this plugin