78% wp-deactivate-features

Code Review | WP Deactivate Features

WordPress plugin WP Deactivate Features scored78%from 54 tests.

About plugin

  • Plugin page: wp-deactivate-fea...
  • Plugin version: 0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.5
  • WordPress version: 6.3.1
  • First release: Oct 24, 2020
  • Latest release: Jan 23, 2021
  • Number of updates: 14
  • Update frequency: every 6.7 days
  • Top authors: saschahuber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /397 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.00MB] [CPU: ▼3.01ms] Passed 4 tests

Server-side resources used by WP Deactivate Features
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.52 ▼3.12
Dashboard /wp-admin3.31 ▲0.0043.26 ▼5.35
Posts /wp-admin/edit.php3.36 ▲0.0046.27 ▼1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.06 ▲1.95
Media Library /wp-admin/upload.php3.23 ▲0.0032.16 ▼2.03

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

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

Browser metrics Passed 4 tests

WP Deactivate Features: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.24 ▼1.144.36 ▲2.7245.02 ▲0.61
Dashboard /wp-admin2,207 ▲194.89 ▲0.01106.58 ▼10.2140.30 ▼9.73
Posts /wp-admin/edit.php2,090 ▲12.04 ▲0.0339.47 ▲3.2737.07 ▲3.96
Add New Post /wp-admin/post-new.php1,534 ▲2022.52 ▲4.93658.77 ▼18.6558.65 ▼0.90
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0095.27 ▼6.6040.16 ▼5.59

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
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-deactivate-features/index.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST) in wp-content/plugins/wp-deactivate-features/class/Settings.php on line 76
    • > PHP Fatal error
      Uncaught Error: Class 'WPDF_OptionsProvider' not found in wp-content/plugins/wp-deactivate-features/class/DeactivationExecutor.php:13

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)
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 uses markdown syntax to describe your plugin to the world
4 plugin tags: features, disable, performance, deactivate

wp-deactivate-features/index.php 92% from 13 tests

The principal PHP file in "WP Deactivate Features" v. 0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-deactivate-features.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected283 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP106371250
PO File17733

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.21
Average class complexity2.78
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin