84% create-and-assign-categories-for-pages

Code Review | Create And Assign Categories For Pages

WordPress plugin Create And Assign Categories For Pages scored 84% from 54 tests.

About plugin

  • Plugin page: create-and-assign...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 5.8.1
  • First release: Apr 17, 2017
  • Latest release: May 19, 2021
  • Number of updates: 32
  • Update frequency: every 47.0 days
  • Top authors: sandeepsinghhdp (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10,000+ active / 34,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼136.23ms] Passed 4 tests

A check of server-side resources used by Create And Assign Categories For Pages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0138.81 ▲4.29
Dashboard /wp-admin3.06 ▲0.0140.00 ▼6.51
Posts /wp-admin/edit.php3.12 ▲0.0147.87 ▲1.99
Add New Post /wp-admin/post-new.php5.46 ▲0.0298.20 ▼533.76
Media Library /wp-admin/upload.php3.01 ▼0.0036.12 ▼6.63
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=page3.0134.85
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page3.0037.62

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
category_children

Browser metrics Passed 4 tests

An overview of browser requirements for Create And Assign Categories For Pages
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11715.90 ▲0.358.98 ▲0.6148.69 ▼4.95
Dashboard /wp-admin2,972 ▲415.85 ▼0.03138.85 ▼11.07119.23 ▲13.64
Posts /wp-admin/edit.php2,749 ▲102.83 ▲0.0176.73 ▲5.8088.06 ▼8.68
Add New Post /wp-admin/post-new.php1,689 ▲618.72 ▼0.11375.58 ▼6.26113.81 ▼5.55
Media Library /wp-admin/upload.php1,820 ▼25.01 ▼0.01167.95 ▲15.95121.28 ▼8.88
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=page1,8362.5159.4880.88
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page1,9202.5065.2997.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/create-and-assign-categories-for-pages/create-and-assign-categories-for-pages.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
10 plugin tags: assign category, page archive, add category, add category to wordpress page, pages...

create-and-assign-categories-for-pages/create-and-assign-categories-for-pages.php 92% from 13 tests

The primary PHP file in "Create And Assign Categories For Pages" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 250 characters long)

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
Everything looks great! No dangerous files found in this plugin17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1181317

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin