74% restrict-taxonomies

Code Review | Restrict Taxonomies

WordPress plugin Restrict Taxonomies scored 74% from 54 tests.

About plugin

  • Plugin page: restrict-taxonomies
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9
  • WordPress version: 5.8.1
  • First release: Oct 30, 2015
  • Latest release: Dec 21, 2017
  • Number of updates: 18
  • Update frequency: every 43.5 days
  • Top authors: sladix (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active / 6,296 total downloads

Benchmarks

Plugin footprint 65% 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.17MB] [CPU: ▼130.45ms] Passed 4 tests

Server-side resources used by Restrict Taxonomies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2542.03 ▲21.09
Dashboard /wp-admin3.23 ▲0.1756.54 ▲7.93
Posts /wp-admin/edit.php3.34 ▲0.2363.13 ▲9.99
Add New Post /wp-admin/post-new.php5.58 ▲0.15111.94 ▼549.87
Media Library /wp-admin/upload.php3.17 ▲0.1645.33 ▲10.16
Restrict Taxonomies /wp-admin/options-general.php?page=restrict-taxonomies3.1534.31

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 3 new options
New WordPress options
RestrictTaxs_post_type_options
RestrictTaxs-screen-options
RestrictTaxs_general_options

Browser metrics Passed 4 tests

An overview of browser requirements for Restrict Taxonomies
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.93 ▲0.3412.05 ▲1.0459.46 ▲7.64
Dashboard /wp-admin2,971 ▲345.92 ▼0.05163.59 ▲5.33147.61 ▲19.49
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0178.69 ▲6.33102.47 ▲0.09
Add New Post /wp-admin/post-new.php1,686 ▼2,00118.45 ▲3.36388.10 ▼104.45114.90 ▼2.48
Media Library /wp-admin/upload.php1,812 ▲25.05 ▼0.06166.84 ▲12.30131.51 ▲3.92
Restrict Taxonomies /wp-admin/options-general.php?page=restrict-taxonomies1,7852.4662.1487.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5495
    unregister_setting was called with an argument that is deprecated since version 4.7.0! $sanitize_callback is deprecated. The callback from register_setting() is used instead.
  • Zombie WordPress options were found after uninstall: 2 options
    • RestrictTaxs-screen-options
    • RestrictTaxs_general_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/restrict-taxonomies/restrict-taxonomies.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: administration, cms, categories, admin, restrict...

restrict-taxonomies/restrict-taxonomies.php Passed 13 tests

Analyzing the main PHP file in "Restrict Taxonomies" version 1.3.3
114 characters long description:
Based on Restrict Categories, restrict the taxonomies terms that users can view, add, and edit in the admin panel.

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
Everything looks great! No dangerous files found in this plugin698 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2177269679
JavaScript14010
Markdown1209

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity52.00
▷ Minimum class complexity3.00
▷ Maximum class complexity112.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2480.00%
▷ Protected methods516.67%
▷ Private methods13.33%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin