84% allow-wp-admin-access

Code Review | Allow wp-admin access

WordPress plugin Allow wp-admin access scored84%from 54 tests.

About plugin

  • Plugin page: allow-wp-admin-ac...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Jun 14, 2022
  • Number of updates: 13
  • Update frequency: every 167.4 days
  • Top authors: brainvireinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,241 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.27ms] Passed 4 tests

Server-side resources used by Allow wp-admin access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.13 ▼0.47
Dashboard /wp-admin3.33 ▲0.0246.02 ▼7.43
Posts /wp-admin/edit.php3.38 ▲0.0246.63 ▼3.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.99 ▼13.18
Media Library /wp-admin/upload.php3.25 ▲0.0234.15 ▼0.00

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Allow wp-admin access
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8414.80 ▲0.271.72 ▼0.2839.96 ▼14.99
Dashboard /wp-admin2,222 ▲314.85 ▼0.05107.70 ▼1.6040.69 ▼1.87
Posts /wp-admin/edit.php2,105 ▲161.98 ▲0.0141.25 ▲4.7634.93 ▼3.49
Add New Post /wp-admin/post-new.php1,550 ▲1722.68 ▼0.30593.76 ▼72.5151.83 ▼1.05
Media Library /wp-admin/upload.php1,404 ▲134.19 ▼0.0494.79 ▼9.4640.83 ▼2.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/allow-wp-admin-access/allow-wp-admin-access.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
7 plugin tags: restrict admin, restrict wp-admin, restrict wp-admin using ip, access denied wp-admin using ip, allow ip...

allow-wp-admin-access/allow-wp-admin-access.php Passed 13 tests

The main file in "Allow wp-admin access" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
This plugin provides the ability to only allow "wp-admin" access from mention ip.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1311966

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin