10% no-captcha-recaptcha-for-woocommerce

Code Review | No CAPTCHA reCAPTCHA for WooCommerce

WordPress plugin No CAPTCHA reCAPTCHA for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: no-captcha-recapt...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Dec 19, 2014
  • Latest release: Apr 15, 2020
  • Number of updates: 44
  • Update frequency: every 44.2 days
  • Top authors: Collizo4sky (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

9,000+ active / 69,813 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/base-class.php+24
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.75MB] [CPU: ▼215.45ms] Passed 4 tests

This is a short check of server-side resources used by No CAPTCHA reCAPTCHA for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.846.46 ▼18.42
Dashboard /wp-admin1.90 ▼1.157.30 ▼36.07
Posts /wp-admin/edit.php1.90 ▼1.216.18 ▼36.60
Add New Post /wp-admin/post-new.php1.90 ▼3.536.11 ▼761.65
Media Library /wp-admin/upload.php1.90 ▼1.105.57 ▼27.49
No CAPTCHA /wp-admin/admin.php?page=wc-ncr1.906.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for No CAPTCHA reCAPTCHA for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲18015.93 ▲0.4510.10 ▲0.0952.40 ▲1.85
Dashboard /wp-admin3,040 ▲1066.13 ▲0.03136.56 ▼16.65122.01 ▲10.81
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0162.50 ▲0.7591.51 ▲0.65
Add New Post /wp-admin/post-new.php1,872 ▲20019.11 ▲0.04373.09 ▼11.26110.01 ▼3.04
Media Library /wp-admin/upload.php1,807 ▼35.04 ▼0.00148.77 ▼5.50119.44 ▼6.82
No CAPTCHA /wp-admin/admin.php?page=wc-ncr1,8262.1259.7175.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/base-class.php+24
    Trying to access array offset on value of type bool

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)
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wc-ncr
    • > Notice in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/lost-password.php+11
    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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Ncr_No_Captcha_Recaptcha' not found in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/lost-password.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/mo-admin-notice.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Ncr_No_Captcha_Recaptcha' not found in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/registration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/mo-admin-notice.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Ncr_No_Captcha_Recaptcha' not found in wp-content/plugins/no-captcha-recaptcha-for-woocommerce/login.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

no-captcha-recaptcha-for-woocommerce/woocommerce-no-captcha-recaptcha.php 85% from 13 tests

The entry point to "No CAPTCHA reCAPTCHA for WooCommerce" version 1.2.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("no-captcha-recaptcha-for-woocommerce.php" instead of "woocommerce-no-captcha-recaptcha.php")

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
Everything looks great! No dangerous files found in this plugin760 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP715362614
PO File16161146

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.17
▷ Minimum class complexity5.00
▷ Maximum class complexity14.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1872.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 images were found in this plugin