84% bulk-deactivate

Code Review | Bulk Deactivate

WordPress plugin Bulk Deactivate scored84%from 54 tests.

About plugin

  • Plugin page: bulk-deactivate
  • Plugin version: 0.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Nov 10, 2014
  • Number of updates: 44
  • Update frequency: every 0.1 days
  • Top authors: raisonon (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

30+ active /2,062 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.86ms] Passed 4 tests

An overview of server-side resources used by Bulk Deactivate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0239.71 ▼1.75
Dashboard /wp-admin3.32 ▲0.0244.05 ▼1.93
Posts /wp-admin/edit.php3.37 ▲0.0247.34 ▼0.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.18 ▼9.74
Media Library /wp-admin/upload.php3.24 ▲0.0234.86 ▼2.01
Bulk Deactivate /wp-admin/plugins.php?page=deactivate3.2332.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
DEACTIV_VERSION_KEY
can_compress_scripts

Browser metrics Passed 4 tests

Bulk Deactivate: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.16 ▼1.151.89 ▼0.4638.83 ▼11.40
Dashboard /wp-admin2,210 ▲225.88 ▲0.9797.62 ▼4.3139.22 ▼0.56
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0339.73 ▼0.3534.65 ▼3.32
Add New Post /wp-admin/post-new.php1,542 ▲2323.07 ▼0.21669.59 ▲51.9352.23 ▼6.93
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0794.37 ▼6.5641.20 ▼3.72
Bulk Deactivate /wp-admin/plugins.php?page=deactivate8821.9730.1129.12

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
  • Zombie WordPress options were found after uninstall: 7 options
    • DEACTIV_VERSION_KEY
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bulk-deactivate/includes/deactivate.php on line 65
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/bulk-deactivate/includes/deactivate.php on line 65
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/bulk-deactivate/includes/deactivate.php on line 65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-deactivate/includes/init.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bulk-deactivate/bulk-deactivate.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: plugin, debug, deactivate, bulk deactivate, activate

bulk-deactivate/bulk-deactivate.php 92% from 13 tests

The entry point to "Bulk Deactivate" version 0.2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,783 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript396111,129
CSS31726441
PHP312429174
Markdown118020
HTML113019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
libs/chosen/chosen-sprite.png0.53KB0.88KB0.00%