78% remove-meta-boxes-per-user-role

Code Review | Remove meta boxes per user role

WordPress plugin Remove meta boxes per user role scored 78% from 54 tests.

About plugin

  • Plugin page: remove-meta-boxes...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Nov 18, 2014
  • Latest release: Nov 19, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mr_mat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.63ms] Passed 4 tests

A check of server-side resources used by Remove meta boxes per user role
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0134.49 ▼0.24
Dashboard /wp-admin3.07 ▲0.0242.35 ▲0.98
Posts /wp-admin/edit.php3.12 ▲0.0246.58 ▲5.41
Add New Post /wp-admin/post-new.php5.43 ▼0.0080.45 ▼572.79
Media Library /wp-admin/upload.php3.01 ▲0.0133.78 ▲1.53
Remove meta boxes per user role /wp-admin/options-general.php?page=remove-meta-boxes-per-user-role2.9828.51

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Checking browser requirements for Remove meta boxes per user role
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.19 ▲0.647.51 ▼0.5548.32 ▲1.18
Dashboard /wp-admin2,975 ▲445.97 ▼0.15141.69 ▼3.50113.96 ▼2.50
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0065.35 ▲1.1486.13 ▼1.68
Add New Post /wp-admin/post-new.php2,060 ▲319.29 ▼0.37364.85 ▲4.02104.18 ▲1.08
Media Library /wp-admin/upload.php1,815 ▲85.02 ▼0.01141.34 ▼2.54118.59 ▲3.88
Remove meta boxes per user role /wp-admin/options-general.php?page=remove-meta-boxes-per-user-role8741.8534.4146.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=remove-meta-boxes-per-user-role
    • > Parse error in wp-content/plugins/remove-meta-boxes-per-user-role/admin_pages/settings.php+66
    syntax error, unexpected '}', expecting end of file

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/remove-meta-boxes-per-user-role/admin_pages/settings.php on line 66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/remove-meta-boxes-per-user-role/remove-meta-boxes-per-role.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings page) image required
  • Plugin Name: You should set the name of your plugin on the first line ( === remove-meta-boxes-per-user-role === )
You can take inspiration from this readme.txt

remove-meta-boxes-per-user-role/remove-meta-boxes-per-role.php 92% from 13 tests

The principal PHP file in "Remove meta boxes per user role" v. 1.01 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 ("remove-meta-boxes-per-user-role.php" instead of "remove-meta-boxes-per-role.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
There were no executable files found in this plugin182 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22525106
PO File1202257
JavaScript11319

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.85KB25.30KB▼ 57.01%