83% wp-plugin-manager

Code Review | WP Plugin Manager - Deactivate plugins per page

WordPress plugin WP Plugin Manager - Deactivate plugins per page scored83%from 54 tests.

About plugin

  • Plugin page: wp-plugin-manager
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 41
  • Update frequency: every 34.0 days
  • Top authors: hasthemes (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

3,000+ active /57,344 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.26ms] 75% from 4 tests

Analyzing server-side resources used by WP Plugin Manager - Deactivate plugins per page
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,325.01ms on /wp-admin/admin.php?page=htpm_recommendations)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.29 ▲1.98
Dashboard /wp-admin3.36 ▲0.0644.03 ▼3.24
Posts /wp-admin/edit.php3.42 ▲0.0644.63 ▼3.34
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.89 ▲3.04
Media Library /wp-admin/upload.php3.29 ▲0.0631.17 ▼0.44
Recommendations /wp-admin/admin.php?page=htpm_recommendations7.571,325.01
Plugin Manager /wp-admin/admin.php?page=htpm-options3.2432.83

Server storage [IO: ▲0.37MB] [DB: ▲0.67MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification found: 1 file (5.00KB) outside of "wp-content/plugins/wp-plugin-manager/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/htpm-mu-plugin.php
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
htpm_status
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Plugin Manager - Deactivate plugins per page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.28 ▼0.001.85 ▲0.2038.61 ▼6.21
Dashboard /wp-admin2,225 ▲485.57 ▲0.0481.50 ▼3.8639.33 ▼4.21
Posts /wp-admin/edit.php2,133 ▲332.02 ▼0.0235.22 ▼1.2130.40 ▼10.55
Add New Post /wp-admin/post-new.php1,555 ▲1823.30 ▲5.12663.39 ▲20.8151.85 ▼22.56
Media Library /wp-admin/upload.php1,427 ▲304.18 ▲0.0295.47 ▼4.0241.35 ▼3.58
Recommendations /wp-admin/admin.php?page=htpm_recommendations2,8862.2327.3568.18
Plugin Manager /wp-admin/admin.php?page=htpm-options9052.3634.4937.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • htpm_status
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-plugin-manager/includes/plugin-options-page.php:6
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-plugin-manager/includes/plugin-options-page.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-plugin-manager/includes/plugin-options-page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-plugin-manager/mu-plugin/htpm-mu-plugin.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-plugin-manager/includes/plugin-options-page.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: deactivate plugin, plugin manager, disable plugin, performance, wp plugin manager

wp-plugin-manager/plugin-main.php 85% from 13 tests

"WP Plugin Manager - Deactivate plugins per page" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-plugin-manager.php" instead of "plugin-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,123 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS486681,755
PHP82201961,203
JavaScript34332165

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/recommended-plugins/assets/images/extensions/htmega-pro.png4.60KB4.78KB0.00%
(invalid) includes/recommended-plugins/assets/images/extensions/ht-menu.png2.85KB0.00KB▼ 100.00%
includes/recommended-plugins/assets/images/extensions/multicurrencypro.png19.01KB9.36KB▼ 50.77%
assets/images/ui-icons_777777_256x240.png6.84KB4.18KB▼ 38.90%
includes/recommended-plugins/assets/images/extensions/ht-script-pro.png6.03KB2.71KB▼ 55.09%