89% disable-add-new-plugins

Code Review | Disable Add New Plugins

WordPress plugin Disable Add New Plugins scored 89% from 54 tests.

About plugin

  • Plugin page: disable-add-new-p...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2015
  • Latest release: Feb 17, 2023
  • Number of updates: 10
  • Update frequency: every 270.3 days
  • Top authors: nikunjsoni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Disable Add New Plugins
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0033.70 ▼7.06
Dashboard /wp-admin3.30 ▲0.0045.34 ▼4.42
Posts /wp-admin/edit.php3.35 ▼0.0046.71 ▲3.53
Add New Post /wp-admin/post-new.php5.88 ▼0.0086.01 ▼4.51
Media Library /wp-admin/upload.php3.23 ▼0.0032.23 ▼0.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Disable Add New Plugins
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,722 ▼3513.23 ▼0.954.54 ▲2.5137.15 ▼4.64
Dashboard /wp-admin2,139 ▼525.79 ▲0.6991.29 ▼13.8037.70 ▼6.25
Posts /wp-admin/edit.php2,031 ▼582.04 ▲0.0739.26 ▲3.7534.21 ▼0.79
Add New Post /wp-admin/post-new.php1,489 ▼2522.98 ▲5.50674.98 ▲56.1443.33 ▼3.98
Media Library /wp-admin/upload.php1,327 ▼614.18 ▲0.0198.75 ▲3.0841.71 ▲1.82

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: wp-admin, plugin, plugins, disable, add new plugins...

disable-add-new-plugins/disable-add-new-plugins.php 85% from 13 tests

The principal PHP file in "Disable Add New Plugins" v. 1.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 177 characters long)

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 plugin10 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP241010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.00
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin