84% bulk-categories-edit-for-media

Code Review | Bulk Categories Edit for Media

WordPress plugin Bulk Categories Edit for Media scored84%from 54 tests.

About plugin

  • Plugin page: bulk-categories-e...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 6, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: tomasbulva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,515 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.27MB] [CPU: ▼13.23ms] Passed 4 tests

Server-side resources used by Bulk Categories Edit for Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.50 ▼5.57
Dashboard /wp-admin3.33 ▲0.0250.84 ▼5.91
Posts /wp-admin/edit.php3.38 ▲0.0251.47 ▲1.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.22 ▼12.17
Media Library /wp-admin/upload.php2.10 ▼1.136.10 ▼29.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bulk Categories Edit for Media
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.371.82 ▼0.3443.04 ▼0.95
Dashboard /wp-admin2,195 ▲155.55 ▼0.0588.42 ▼2.0241.79 ▼4.23
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0642.22 ▲2.4435.51 ▲1.03
Add New Post /wp-admin/post-new.php1,536 ▲823.02 ▼0.13614.38 ▼54.3550.61 ▼11.14
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.0897.29 ▼4.9143.49 ▲0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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 shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bulk-categories-edit-for-media/custom_bulk_edit_categories_in_media.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

bulk-categories-edit-for-media/custom_bulk_edit_categories_in_media.php 92% from 13 tests

The entry point to "Bulk Categories Edit for Media" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bulk-categories-edit-for-media.php" instead of "custom_bulk_edit_categories_in_media.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,381 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS234521,093
JavaScript1243144
PHP13010140
Markdown1204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity5.40
▷ Minimum method complexity2.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
13 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jquery-ui/css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png0.09KB0.11KB0.00%
js/jquery-ui/css/flick/images/ui-icons_0073ea_256x240.png4.27KB4.11KB▼ 3.78%
js/jquery-ui/css/flick/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
js/jquery-ui/css/flick/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
js/jquery-ui/css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png0.09KB0.14KB0.00%