10% captcha-for-widgets

Code Review | Captcha for Widgets

WordPress plugin Captcha for Widgets scored10%from 54 tests.

About plugin

  • Plugin page: captcha-for-widgets
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Jul 24, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: SimonaIlie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,320 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/captcha-for-widgets/captcha-for-widgets.php+248
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.60ms] Passed 4 tests

Server-side resources used by Captcha for Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.355.05 ▼34.57
Dashboard /wp-admin2.13 ▼1.175.84 ▼44.02
Posts /wp-admin/edit.php2.14 ▼1.226.75 ▼37.96
Add New Post /wp-admin/post-new.php2.13 ▼3.765.49 ▼97.83
Media Library /wp-admin/upload.php2.13 ▼1.106.11 ▼29.15
Captcha for Widgets Settings /wp-admin/options-general.php?page=captcha_for_widgets_options2.145.39

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Captcha for Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.97 ▼0.348.41 ▲6.6641.21 ▼6.25
Dashboard /wp-admin2,218 ▲304.90 ▲0.03112.62 ▼4.1338.84 ▼7.23
Posts /wp-admin/edit.php2,101 ▲152.05 ▼0.0047.32 ▲9.9534.46 ▲0.40
Add New Post /wp-admin/post-new.php1,524 ▲1023.57 ▲0.11671.87 ▲5.3360.19 ▼3.12
Media Library /wp-admin/upload.php1,403 ▲184.28 ▲0.12103.54 ▲4.0841.72 ▼4.76
Captcha for Widgets Settings /wp-admin/options-general.php?page=captcha_for_widgets_options9932.1630.2030.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/captcha-for-widgets/captcha-for-widgets.php+248
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=captcha_for_widgets_options
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/captcha-for-widgets/captcha-for-widgets.php+248
    Array and string offset access syntax with curly braces is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/captcha-for-widgets/captcha-for-widgets.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/captcha-for-widgets/admin/realperson-settings.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/captcha-for-widgets/admin/options.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/captcha-for-widgets/admin/recaptcha-settings.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === captcha-for-widgets === )
  • Screenshots: These screenshots do not have images: #1 (The admin panel for reCAPTCHA.), #2 (The admin panel for Realperson.)
  • Contributors: Please add at least on tag
You can look at the official readme.txt

captcha-for-widgets/captcha-for-widgets.php 92% from 13 tests

The entry point to "Captcha for Widgets" version 0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected857 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP5110130501
JavaScript83623234
CSS682122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
3 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png80.82KB32.97KB▼ 59.20%
admin/css/realperson-icon.png1.26KB1.36KB0.00%
assets/screenshot-2.png52.45KB28.04KB▼ 46.53%