84% disable-unused-features

Code Review | Disable Unused Pages

WordPress plugin Disable Unused Pages scored84%from 54 tests.

About plugin

  • Plugin page: disable-unused-fe...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: May 29, 2020
  • Number of updates: 4
  • Update frequency: every 23.5 days
  • Top authors: andreadegiovine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /913 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.08MB] [CPU: ▼5.44ms] Passed 4 tests

An overview of server-side resources used by Disable Unused Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0940.02 ▲0.89
Dashboard /wp-admin3.38 ▲0.0845.98 ▼7.12
Posts /wp-admin/edit.php3.44 ▲0.0847.50 ▲1.88
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.72 ▼16.87
Media Library /wp-admin/upload.php3.31 ▲0.0834.47 ▲1.33
Disable pages /wp-admin/options-general.php?page=disable-unused-features3.2731.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Disable Unused Pages: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.35 ▼1.042.03 ▼0.0743.63 ▼4.43
Dashboard /wp-admin2,206 ▲185.80 ▲0.9198.83 ▼10.4340.73 ▼4.18
Posts /wp-admin/edit.php2,092 ▲212.01 ▼0.0537.02 ▲0.4135.33 ▲2.33
Add New Post /wp-admin/post-new.php1,533 ▲1923.27 ▲5.63680.19 ▲68.4857.01 ▲12.03
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0797.91 ▼1.6641.89 ▼1.97
Disable pages /wp-admin/options-general.php?page=disable-unused-features8922.0322.4924.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% 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/disable-unused-features/disable-unused-features.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: tag archives, author archives, category archives, disable pages, date archives

disable-unused-features/disable-unused-features.php Passed 13 tests

The primary PHP file in "Disable Unused Pages" version 1.2 is used by WordPress to initiate all plugin functionality
134 characters long description:
Redirect to 404: Author archives, Date archives, Attachment page, Category archives, Tag archives or Search page. Easy, safe and fast!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin341 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15312207
CSS1282134

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.78
Average class complexity79.00
▷ Minimum class complexity79.00
▷ Maximum class complexity79.00
Average method complexity5.88
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin