78% wd-limit-admin-ip

Code Review | WD Limit IP Admin

WordPress plugin WD Limit IP Admin scored78%from 54 tests.

About plugin

  • Plugin page: wd-limit-admin-ip
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 24, 2021
  • Latest release: Apr 24, 2021
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: wedevpt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WD Limit IP Admin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.20 ▼0.71
Dashboard /wp-admin3.33 ▼0.0150.28 ▼14.34
Posts /wp-admin/edit.php3.38 ▲0.0352.23 ▲5.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.52 ▼18.87
Media Library /wp-admin/upload.php3.26 ▲0.0335.03 ▼2.47
/wp-admin/options-general.php?page=wp-limit-ip-admin3.2031.49

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WD Limit IP Admin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.24 ▼0.111.98 ▲0.2545.50 ▲2.88
Dashboard /wp-admin2,200 ▲235.61 ▼0.0689.08 ▼1.7339.97 ▼0.91
Posts /wp-admin/edit.php2,111 ▲112.00 ▲0.0635.41 ▼0.5236.52 ▼2.44
Add New Post /wp-admin/post-new.php1,433 ▼9321.79 ▼1.36576.94 ▼135.6229.90 ▼24.30
Media Library /wp-admin/upload.php1,408 ▲84.28 ▲0.11103.16 ▼10.0642.09 ▼2.97
/wp-admin/options-general.php?page=wp-limit-ip-admin8071.9624.8527.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-limit-ip-admin
    • > Notice in wp-content/plugins/wd-limit-admin-ip/wd-limit-ip-admin.php+104
    Trying to access array offset on value of type bool

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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wd-limit-admin-ip/wd-limit-ip-admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: filter ip, limit, ip, access, restrict

wd-limit-admin-ip/wd-limit-ip-admin.php 92% from 13 tests

"WD Limit IP Admin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wd-limit-admin-ip.php" instead of "wd-limit-ip-admin.php")

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
Everything looks great! No dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1211173

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions9
▷ Named functions9100.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