79% wp-restricted

Code Review | Wp Restricted

WordPress plugin Wp Restricted scored79%from 54 tests.

About plugin

  • Plugin page: wp-restricted
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.0
  • WordPress version: 6.3.1
  • First release: Mar 17, 2017
  • Latest release: Jan 5, 2019
  • Number of updates: 7
  • Update frequency: every 93.1 days
  • Top authors: neerajsharma2855 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.46ms] Passed 4 tests

An overview of server-side resources used by Wp Restricted
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.92 ▼8.64
Dashboard /wp-admin3.31 ▲0.0150.58 ▼4.11
Posts /wp-admin/edit.php3.36 ▲0.0049.57 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.01100.46 ▲5.43
Media Library /wp-admin/upload.php3.23 ▲0.0040.80 ▲4.66
Wp Restricted /wp-admin/options-general.php?page=wprestricted_manage3.1733.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Restricted
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.40 ▼0.392.02 ▲0.1241.84 ▼3.79
Dashboard /wp-admin2,207 ▲195.84 ▲0.00106.09 ▼15.2436.82 ▼3.80
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0633.39 ▼7.7132.61 ▼3.77
Add New Post /wp-admin/post-new.php1,517 ▼1617.42 ▼5.75614.69 ▼80.7855.00 ▼6.91
Media Library /wp-admin/upload.php1,389 ▲14.21 ▼0.08100.83 ▼7.1444.45 ▼4.09
Wp Restricted /wp-admin/options-general.php?page=wprestricted_manage8132.0323.6623.77

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wprestricted_manage
    • > Warning in wp-content/plugins/wp-restricted/wp-restricted.php+59
    gethostbyaddr(): Address is not a valid IPv4 or IPv6 address

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 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/wp-restricted/wp-restricted.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: ban, denied, ip, banned, permission...

wp-restricted/wp-restricted.php Passed 13 tests

Analyzing the main PHP file in "Wp Restricted" version 0.2
101 characters long description:
This plugin is restricted all ip except one ip . if you want open wp admin with particular single IP.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101094

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected