10% lazycaptcha

Code Review | LazyCaptcha

WordPress plugin LazyCaptcha scored10%from 54 tests.

About plugin

  • Plugin page: lazycaptcha
  • Plugin version: 0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Mar 13, 2023
  • Number of updates: 16
  • Update frequency: every 55.0 days
  • Top authors: tuxlog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.48ms] Passed 4 tests

Analyzing server-side resources used by LazyCaptcha
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0448.72 ▲11.98
Dashboard /wp-admin3.34 ▼0.0050.51 ▼16.53
Posts /wp-admin/edit.php3.39 ▲0.0446.80 ▼3.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.43 ▼7.55
Media Library /wp-admin/upload.php3.26 ▲0.0435.54 ▲1.37

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_lazy_captcha
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by LazyCaptcha
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.66 ▼0.701.94 ▲0.4243.51 ▲0.87
Dashboard /wp-admin2,211 ▲235.85 ▼0.03110.87 ▲5.8842.33 ▼4.04
Posts /wp-admin/edit.php2,073 ▼162.02 ▲0.0135.48 ▼6.5233.95 ▼1.93
Add New Post /wp-admin/post-new.php1,530 ▼523.13 ▼0.12666.49 ▼22.5557.24 ▲0.78
Media Library /wp-admin/upload.php1,390 ▲54.15 ▼0.27103.68 ▼0.4848.60 ▲1.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazycaptcha/lazycaptcha.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: antispam, comment, arithmetic, lazy, math...

lazycaptcha/lazycaptcha.php 77% from 13 tests

The primary PHP file in "LazyCaptcha" version 0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/lang")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin254 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14594167
PO File2142063
CSS14024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin