72% disable-plugin-deactivation

Code Review | Disable Plugin Deactivation

WordPress plugin Disable Plugin Deactivation scored 72% from 54 tests.

About plugin

  • Plugin page: disable-plugin-de...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 20, 2016
  • Latest release: Jan 5, 2021
  • Number of updates: 11
  • Update frequency: every 151.2 days
  • Top authors: pawaryogesh1989 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,667 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.89MB] [CPU: ▼174.97ms] Passed 4 tests

An overview of server-side resources used by Disable Plugin Deactivation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.81 ▲10.77
Dashboard /wp-admin2.75 ▼0.3021.75 ▼27.27
Posts /wp-admin/edit.php2.76 ▼0.3523.01 ▼22.54
Add New Post /wp-admin/post-new.php2.76 ▼2.6823.77 ▼634.74
Media Library /wp-admin/upload.php2.76 ▼0.2521.18 ▼15.34
Plugin Deactivation Settings /wp-admin/plugins.php?page=plugin-deactivation-settings2.8618.11

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Disable Plugin Deactivation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.01 ▲0.548.60 ▼0.7852.15 ▲1.91
Dashboard /wp-admin2,972 ▲385.86 ▼0.19142.64 ▼7.89107.44 ▼12.49
Posts /wp-admin/edit.php2,744 ▲82.69 ▼0.0069.05 ▼1.3797.01 ▼1.36
Add New Post /wp-admin/post-new.php1,501 ▼9318.79 ▲0.00377.88 ▼28.15106.51 ▼9.52
Media Library /wp-admin/upload.php1,815 ▲85.02 ▼0.01144.35 ▼8.49130.28 ▲3.30
Plugin Deactivation Settings /wp-admin/plugins.php?page=plugin-deactivation-settings1,1822.1063.38109.60

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

Smoke tests 25% 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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=plugin-deactivation-settings
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/disable-plugin-deactivation/disable-plugin-deactivation.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-plugin-deactivation/classes/class.plugin.deactivation.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/disable-plugin-deactivation/views/disable-deactivation-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

disable-plugin-deactivation/disable-plugin-deactivation.php 92% from 13 tests

The primary PHP file in "Disable Plugin Deactivation" version 2.2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin143 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33347143

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin