79% admin-trim-interface

Code Review | Admin Trim Interface

WordPress plugin Admin Trim Interface scored79%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: 6.3.1
  • 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 /44,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.65ms] Passed 4 tests

A check of server-side resources used by Admin Trim Interface
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2144.39 ▲8.94
Dashboard /wp-admin3.52 ▲0.2158.94 ▲11.08
Posts /wp-admin/edit.php3.63 ▲0.2742.55 ▼1.85
Add New Post /wp-admin/post-new.php6.10 ▲0.2182.35 ▼12.23
Media Library /wp-admin/upload.php3.44 ▲0.2137.72 ▲2.53
Admin Trim Interface /wp-admin/themes.php?page=admin-trim-interface/admin-trim-interface.php3.4331.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Trim Interface
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼1.154.53 ▲2.8042.13 ▲3.09
Dashboard /wp-admin2,207 ▲185.82 ▲0.8699.77 ▼18.3338.70 ▼0.55
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0634.14 ▼2.1036.02 ▲4.62
Add New Post /wp-admin/post-new.php1,545 ▲323.33 ▲4.83670.12 ▲63.5355.65 ▼6.27
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0095.88 ▼4.5941.52 ▼1.24
Admin Trim Interface /wp-admin/themes.php?page=admin-trim-interface/admin-trim-interface.php9321.7232.3838.18

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
The following issues need your attention
  • 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 have triggered server-side errors or warnings:
    • > 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)
Everything seems fine on the user side

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, interface, coffee2code, minimal, admin

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

The principal PHP file in "Admin Trim Interface" v. 3.5.1 is loaded by WordPress automatically on each request
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 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,541 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP62835851,202
Markdown3480304
Bourne Shell16221
XML10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues 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

All PNG images should be compressed to minimize bandwidth usage for end users
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
c2c_minilogo.png3.49KB1.91KB▼ 45.43%
screenshot-1.png209.53KB71.49KB▼ 65.88%