78% customizable-captcha-and-contact-us-form

Code Review | Customizable Captcha and Contact us

WordPress plugin Customizable Captcha and Contact us scored 78% from 54 tests.

About plugin

  • Plugin page: customizable-capt...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Aug 17, 2013
  • Latest release: Jun 22, 2022
  • Number of updates: 39
  • Update frequency: every 82.9 days
  • Top authors: osolwordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 6,251 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼15.31ms] Passed 4 tests

Analyzing server-side resources used by Customizable Captcha and Contact us
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.04114.52 ▼3.54
Dashboard /wp-admin3.32 ▲0.02135.18 ▲18.71
Posts /wp-admin/edit.php3.37 ▲0.02128.98 ▼5.40
Add New Post /wp-admin/post-new.php5.90 ▲0.02222.31 ▼31.29
Media Library /wp-admin/upload.php3.25 ▲0.02111.03 ▼21.00
Captcha Settings /wp-admin/options-general.php?page=cust-captcha-settings3.2972.90
Contact page settings /wp-admin/options-general.php?page=cust-contact-settings3.2473.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
cust_captcha_contact_email
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
cust_captcha_status
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Customizable Captcha and Contact us
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲15513.83 ▼0.6938.64 ▲33.68106.80 ▲0.69
Dashboard /wp-admin2,211 ▲115.85 ▲0.00239.14 ▼35.77105.58 ▲18.01
Posts /wp-admin/edit.php2,097 ▲51.99 ▼0.0197.35 ▼3.1088.93 ▲33.63
Add New Post /wp-admin/post-new.php1,366 ▼6216.54 ▼6.641,439.64 ▼255.0396.60 ▼31.75
Media Library /wp-admin/upload.php1,393 ▲114.22 ▲0.03221.48 ▼150.74140.09 ▼32.48
Captcha Settings /wp-admin/options-general.php?page=cust-captcha-settings1,1442.0665.9666.09
Contact page settings /wp-admin/options-general.php?page=cust-contact-settings8012.0176.8968.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • cust_captcha_status
    • widget_theysaidso_widget
    • cust_captcha_contact_email
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/customizable-captcha-and-contact-us-form/contact-customization-options.php
    • > /wp-content/plugins/customizable-captcha-and-contact-us-form/captcha-customization-options.php
    • > /wp-content/plugins/customizable-captcha-and-contact-us-form/displayCaptcha.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/customizable-captcha-and-contact-us-form/custCaptchaContact.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/customizable-captcha-and-contact-us-form/cccontact_form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: captcha, contact us, ajax

customizable-captcha-and-contact-us-form/custCaptchaContact.php 85% from 13 tests

"Customizable Captcha and Contact us" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("customizable-captcha-and-contact-us-form.php" instead of "custCaptchaContact.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,501 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP62872721,344
JavaScript173169
Markdown120066
CSS10022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity6.47
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods529.41%
▷ Protected methods1270.59%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
utils/temp.png8.99KB5.85KB▼ 34.88%
utils/font-png.png8.99KB5.85KB▼ 34.88%