10% protect-ai-login

Code Review | Protect Ai Login

WordPress plugin Protect Ai Login scored10%from 54 tests.

About plugin

  • Plugin page: protect-ai-login
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Apr 14, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: anouny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /844 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-includes/plugin.php+1006
    Undefined offset: 1

Server metrics [RAM: ▼1.85MB] [CPU: ▼52.38ms] Passed 4 tests

An overview of server-side resources used by Protect Ai Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.84 ▼32.81
Dashboard /wp-admin2.16 ▼1.145.45 ▼39.51
Posts /wp-admin/edit.php2.16 ▼1.195.92 ▼42.42
Add New Post /wp-admin/post-new.php2.16 ▼3.736.53 ▼94.76
Media Library /wp-admin/upload.php2.16 ▼1.076.15 ▼27.23

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
protect_ais
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Protect Ai Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲23615.04 ▲0.641.66 ▼0.3544.35 ▲0.52
Dashboard /wp-admin2,388 ▲1976.65 ▲0.61133.17 ▲34.0841.45 ▼1.50
Posts /wp-admin/edit.php2,303 ▲2143.72 ▲1.7356.50 ▲16.7236.04 ▲2.42
Add New Post /wp-admin/post-new.php1,553 ▲1117.79 ▼0.56665.90 ▲26.4237.43 ▼18.81
Media Library /wp-admin/upload.php1,437 ▲464.55 ▲0.3383.39 ▼17.9241.19 ▼4.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-includes/plugin.php+1006
    Undefined offset: 1
  • This plugin does not fully uninstall, leaving 7 options in the database
    • protect_ais
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/protect-ai-login/settings.php
    • > /wp-content/plugins/protect-ai-login/login.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/protect-ai-login/gCaptcha/ReCaptcha/RequestMethod/Post.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/protect-ai-login/protect_ais.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/protect-ai-login/gCaptcha/ReCaptcha/RequestMethod/SocketPost.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/protect-ai-login/gCaptcha/ReCaptcha/RequestMethod/CurlPost.php:37

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

protect-ai-login/protect_ais.php 85% from 13 tests

The main PHP file in "Protect Ai Login" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 267 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("protect-ai-login.php" instead of "protect_ais.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin911 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13147520886
JavaScript10225

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.80
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin