94% admin-tools

Code Review | Admin Tools

WordPress plugin Admin Tools scored 94% from 54 tests.

About plugin

  • Plugin page: admin-tools
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8.1
  • WordPress version: 5.9.2
  • First release: Aug 9, 2016
  • Latest release: Sep 30, 2021
  • Number of updates: 33
  • Update frequency: every 56.9 days
  • Top authors: yehi (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

4,000+ active / 33,642 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.23MB] [CPU: ▼284.40ms] Passed 4 tests

Server-side resources used by Admin Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3058.09 ▲6.63
Dashboard /wp-admin3.66 ▲0.2542.54 ▲5.87
Posts /wp-admin/edit.php3.89 ▲0.2544.44 ▲7.04
Add New Post /wp-admin/post-new.php7.13 ▲0.1598.07 ▼1,156.59
Media Library /wp-admin/upload.php3.55 ▲0.2531.32 ▲6.48
Admin Tools /wp-admin/options-general.php?page=admin-tools3.5636.50

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.94 ▲0.166.30 ▲0.102.52 ▼0.45
Dashboard /wp-admin2,897 ▲366.15 ▼0.02117.10 ▼24.31152.04 ▼10.95
Posts /wp-admin/edit.php2,696 ▲53.24 ▼0.0063.04 ▼5.14144.45 ▼3.08
Add New Post /wp-admin/post-new.php1,775 ▲5621.73 ▼0.41451.27 ▲44.20156.48 ▼0.28
Media Library /wp-admin/upload.php1,703 ▲115.47 ▼0.06162.73 ▲19.31200.40 ▲9.50
Admin Tools /wp-admin/options-general.php?page=admin-tools2,5494.3171.19142.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/admin-tools/admin-tools.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/admin-tools/uninstall.php:2

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

admin-tools/admin-tools.php Passed 13 tests

The entry point to "Admin Tools" version 1.3.9 is a PHP file that has certain tags in its header comment area
51 characters long description:
Preparing your customer management interface easily

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
Success! There were no dangerous files found in this plugin1,335 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP28628961
PO File1650147
CSS1327136
JavaScript1181291

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity165.00
▷ Minimum class complexity165.00
▷ Maximum class complexity165.00
Average method complexity7.83
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin