94% freelance-admin-hider

Code Review | Freelance Admin Hider

WordPress plugin Freelance Admin Hider scored 94% from 54 tests.

About plugin

  • Plugin page: freelance-admin-h...
  • Plugin version: 0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6
  • WordPress version: 5.9.2
  • First release: Jun 5, 2020
  • Latest release: Jan 4, 2021
  • Number of updates: 5
  • Update frequency: every 42.8 days
  • Top authors: fabsere (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 1,031 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼289.59ms] Passed 4 tests

An overview of server-side resources used by Freelance Admin Hider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0561.55 ▲6.42
Dashboard /wp-admin3.46 ▲0.0637.58 ▲1.40
Posts /wp-admin/edit.php3.70 ▲0.0643.94 ▲2.39
Add New Post /wp-admin/post-new.php6.93 ▼0.0499.22 ▼1,163.10
Media Library /wp-admin/upload.php3.35 ▲0.0529.16 ▲0.97

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Freelance Admin Hider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4815.89 ▲0.335.92 ▼0.042.47 ▲0.15
Dashboard /wp-admin2,892 ▲376.10 ▼0.04118.28 ▼19.69152.83 ▼9.65
Posts /wp-admin/edit.php2,691 ▼33.24 ▼0.0063.02 ▼0.77136.45 ▼4.57
Add New Post /wp-admin/post-new.php1,661 ▼11216.41 ▼4.64383.34 ▼85.43155.40 ▲6.73
Media Library /wp-admin/upload.php1,695 ▼65.49 ▼0.06149.75 ▲8.29192.54 ▲10.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/freelance-admin-hider/freelance-admin-hider.php
    • > /wp-content/plugins/freelance-admin-hider/functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: admin, tools

freelance-admin-hider/freelance-admin-hider.php Passed 13 tests

The main PHP script in "Freelance Admin Hider" version 0.2 is automatically included on every request by WordPress
38 characters long description:
Controls which admin menu item to show

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33861225

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin