84% bulk-categories-assign

Code Review | Bulk Categories Assign

WordPress plugin Bulk Categories Assign scored84%from 54 tests.

About plugin

  • Plugin page: bulk-categories-a...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: Sep 7, 2017
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: haider8278 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Bulk Categories Assign
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.32 ▼0.03
Dashboard /wp-admin3.32 ▼0.0344.21 ▼19.40
Posts /wp-admin/edit.php3.37 ▲0.0246.07 ▲1.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.00 ▼4.97
Media Library /wp-admin/upload.php3.24 ▲0.0136.54 ▼10.71
BCA /wp-admin/admin.php?page=bulk_categories_assign3.2330.51
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.2436.14
BCA Actions /wp-admin/admin.php?page=bca_actions3.1930.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
category_children
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Bulk Categories Assign
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17514.05 ▼0.339.41 ▲7.7440.98 ▼4.29
Dashboard /wp-admin2,243 ▲545.85 ▲0.87109.35 ▼11.3773.51 ▲28.27
Posts /wp-admin/edit.php2,125 ▲332.05 ▲0.0538.31 ▲4.1831.28 ▼2.08
Add New Post /wp-admin/post-new.php1,552 ▲3323.40 ▼0.22606.17 ▼93.5533.91 ▼22.07
Media Library /wp-admin/upload.php1,416 ▲284.23 ▲0.0094.52 ▼14.9470.53 ▲22.15
BCA /wp-admin/admin.php?page=bulk_categories_assign1,2163.1143.4667.13
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,4792.2729.7536.74
BCA Actions /wp-admin/admin.php?page=bca_actions6831.146.7518.49

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 7 options in the database
    • category_children
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bulk_categories_assign
    • > Notice in wp-content/plugins/bulk-categories-assign/bulk-categories-assign.php+396
    Undefined index: paged
    • > GET request to /wp-admin/admin.php?page=bulk_categories_assign
    • > Notice in wp-content/plugins/bulk-categories-assign/bulk-categories-assign.php+109
    Undefined index: cat
    • > GET request to /wp-admin/admin.php?page=bulk_categories_assign
    • > Notice in wp-content/plugins/bulk-categories-assign/bulk-categories-assign.php+126
    Undefined variable: categories_list
    • > GET request to /wp-admin/admin.php?page=bulk_categories_assign
    • > Notice in wp-content/plugins/bulk-categories-assign/bulk-categories-assign.php+139
    Trying to get property 'max_num_pages' of non-object

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: "haider8278@gmail.com"
You can look at the official readme.txt

bulk-categories-assign/bulk-categories-assign.php Passed 13 tests

Analyzing the main PHP file in "Bulk Categories Assign" version 1.0
79 characters long description:
A plugin that will used to select and assign bulk categories to gallery images.

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 plugin6,351 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,3918525,070
PHP3122751,022
CSS31820259

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity32.00
▷ Minimum class complexity4.00
▷ Maximum class complexity96.00
Average method complexity9.27
▷ Minimum method complexity2.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods533.33%
▷ Public methods1386.67%
▷ Protected methods213.33%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/a17.png5.38KB3.32KB▼ 38.24%
images/gallery_next-hover.png2.08KB0.88KB▼ 57.61%
images/gallery_next.png2.01KB0.78KB▼ 61.39%
img/t01.png1.58KB0.74KB▼ 53.49%
images/logo_icon.png4.47KB3.24KB▼ 27.47%