84% advanced-nocaptcha-recaptcha

Code Review | CAPTCHA 4WP

WordPress plugin CAPTCHA 4WP scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-nocaptch...
  • Plugin version: 7.0.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.1
  • WordPress version: 5.9.2
  • First release: Apr 27, 2015
  • Latest release: Mar 15, 2022
  • Number of updates: 128
  • Update frequency: every 19.6 days
  • Top authors: shamim51 (75%)WPWhiteSecurity (25.78%)

Code review

54 tests

User reviews

207 reviews

Install metrics

200,000+ active / 2,118,727 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
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼299.19ms] Passed 4 tests

Server-side resources used by CAPTCHA 4WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2161.45 ▲10.46
Dashboard /wp-admin3.79 ▲0.3836.42 ▲2.70
Posts /wp-admin/edit.php4.02 ▲0.3740.27 ▲4.16
Add New Post /wp-admin/post-new.php7.32 ▲0.3597.26 ▼1,209.15
Media Library /wp-admin/upload.php3.74 ▲0.4429.86 ▲5.55
CAPTCHA Configuration /wp-admin/admin.php?page=c4wp-admin-captcha3.6526.01
Settings & Placements /wp-admin/admin.php?page=c4wp-admin-settings3.6525.20
Premium Features ➤ /wp-admin/admin.php?page=c4wp-admin-upgrade3.6724.38
Help & Contact Us /wp-admin/admin.php?page=c4wp-admin-help3.6724.45

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 2 new options
New WordPress options
c4wp_70_upgrade_complete
c4wp_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CAPTCHA 4WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲7115.54 ▼0.086.34 ▲0.072.38 ▼0.12
Dashboard /wp-admin2,922 ▲716.23 ▲0.03117.16 ▼20.66188.09 ▲25.71
Posts /wp-admin/edit.php2,736 ▲453.12 ▼0.1166.27 ▲1.05150.12 ▲0.76
Add New Post /wp-admin/post-new.php1,718 ▲5721.25 ▲4.94423.22 ▼6.32165.34 ▲5.62
Media Library /wp-admin/upload.php1,741 ▲435.48 ▼0.06126.29 ▼17.92215.21 ▲28.25
CAPTCHA Configuration /wp-admin/admin.php?page=c4wp-admin-captcha1,6922.9460.89153.46
Settings & Placements /wp-admin/admin.php?page=c4wp-admin-settings1,2872.6059.84166.47
Premium Features ➤ /wp-admin/admin.php?page=c4wp-admin-upgrade2,0982.5558.73146.84
Help & Contact Us /wp-admin/admin.php?page=c4wp-admin-help1,4862.5754.93160.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 2 options
    • c4wp_70_upgrade_complete
    • c4wp_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant C4WP_PLUGIN_URL - assumed 'C4WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/upgrade/index.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/upgrade/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/help/sidebar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/help/sidebar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/help/sidebar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/templates/help/index.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-nocaptcha-recaptcha/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-nocaptcha-recaptcha/anr-captcha-class.php:553
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-nocaptcha-recaptcha/admin/settings.php:895

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: captcha, forms captcha, spam protection, captcha for woocommerce, invisible captcha...

advanced-nocaptcha-recaptcha/advanced-nocaptcha-recaptcha.php 92% from 13 tests

Analyzing the main PHP file in "CAPTCHA 4WP" version 7.0.6.1
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 238 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,673 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP92911392,130
CSS22912325
JavaScript13425218

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity65.00
▷ Minimum class complexity3.00
▷ Maximum class complexity116.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods54
▷ Static methods47.41%
▷ Public methods5092.59%
▷ Protected methods00.00%
▷ Private methods47.41%
Functions30
▷ Named functions2686.67%
▷ Anonymous functions413.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/20x20-icon.png0.74KB0.89KB0.00%
assets/img/c4wp-logo-300x300.png5.07KB4.23KB▼ 16.57%
assets/img/c4wp-logo-full.png14.92KB5.01KB▼ 66.40%
assets/img/wp-white-security.png8.80KB4.31KB▼ 51.05%
assets/img/features-image.png53.76KB16.88KB▼ 68.60%