89% admin-trim-interface

Code Review | Admin Trim Interface

WordPress plugin Admin Trim Interface scored 89% from 54 tests.

About plugin

  • Plugin page: admin-trim-interface
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Jul 29, 2009
  • Latest release: Apr 14, 2021
  • Number of updates: 25
  • Update frequency: every 173.6 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 41,532 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼297.36ms] Passed 4 tests

Analyzing server-side resources used by Admin Trim Interface
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.6761.00 ▲10.52
Dashboard /wp-admin3.63 ▲0.2235.51 ▲2.56
Posts /wp-admin/edit.php3.85 ▲0.2137.40 ▼6.39
Add New Post /wp-admin/post-new.php7.09 ▲0.1291.70 ▼1,192.79
Media Library /wp-admin/upload.php3.50 ▲0.2131.87 ▲7.17
Admin Trim Interface /wp-admin/themes.php?page=admin-trim-interface/admin-trim-interface.php3.6425.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Admin Trim Interface
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4616.27 ▲0.606.55 ▲0.183.03 ▲0.54
Dashboard /wp-admin2,893 ▲326.12 ▼0.08164.74 ▲28.72180.24 ▼45.74
Posts /wp-admin/edit.php2,690 ▼13.24 ▲0.0162.45 ▲0.28197.29 ▲56.59
Add New Post /wp-admin/post-new.php1,693 ▲3220.61 ▲3.47436.44 ▼7.82174.38 ▼1.42
Media Library /wp-admin/upload.php1,700 ▲55.54 ▼0.01157.35 ▲8.44204.79 ▼62.01
Admin Trim Interface /wp-admin/themes.php?page=admin-trim-interface/admin-trim-interface.php1,1762.6261.62163.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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 return non-empty strings:
    • > /wp-content/plugins/admin-trim-interface/tests/bootstrap.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/admin-trim-interface/tests/bootstrap.php on line 17
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-trim-interface/tests/bootstrap.php on line 17

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: customize, admin, coffee2code, minimal, interface

admin-trim-interface/admin-trim-interface.php Passed 13 tests

The primary PHP file in "Admin Trim Interface" version 3.5.1 is used by WordPress to initiate all plugin functionality
99 characters long description:
Customize the WordPress admin pages by selectively removing interface elements on a per-user basis.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,541 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP62835851,202
Markdown3480304
Bourne Shell16221
XML10014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity45.75
▷ Minimum class complexity3.00
▷ Maximum class complexity140.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes133.33%
Methods99
▷ Static methods77.07%
▷ Public methods8585.86%
▷ Protected methods1414.14%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png209.53KB71.49KB▼ 65.88%
c2c_minilogo.png3.49KB1.91KB▼ 45.43%