83% only-allow-administrators

Code Review | Only Allow Administrators

WordPress plugin Only Allow Administrators scored83%from 54 tests.

About plugin

  • Plugin page: only-allow-admini...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 23, 2017
  • Latest release: Jan 23, 2017
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: infodesignbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 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
Install script ran successfully

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

A check of server-side resources used by Only Allow Administrators
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.47 ▼4.76
Dashboard /wp-admin3.31 ▲0.0146.32 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0147.80 ▲1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.81 ▼13.08
Media Library /wp-admin/upload.php3.23 ▲0.0136.38 ▲0.52

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Only Allow Administrators: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.061.52 ▼0.1037.78 ▼1.01
Dashboard /wp-admin2,206 ▲185.81 ▼0.04102.20 ▼10.7438.59 ▼5.71
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0138.83 ▲2.3535.71 ▲2.03
Add New Post /wp-admin/post-new.php1,514 ▼1417.87 ▼0.35668.33 ▲61.3659.57 ▲6.76
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0096.28 ▼6.4445.53 ▲4.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/only-allow-administrators/only-allow-administrators.php

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 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Only Allow Administrators), #2 (Dashboard Appearnce after activating the plugin)
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

only-allow-administrators/only-allow-administrators.php Passed 13 tests

The main PHP script in "Only Allow Administrators" version 1.0 is automatically included on every request by WordPress
131 characters long description:
Only Allow Administrators is a simple and useful plugin. Without Administrators user, nobody can't log in your WordPress dashboard.

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
There were no executable files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111319

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.43
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin