74% cforms2-really-simple-captcha

Code Review | Really Simple CAPTCHA for cformsII

WordPress plugin Really Simple CAPTCHA for cformsII scored74%from 54 tests.

About plugin

  • Plugin page: cforms2-really-si...
  • Plugin version: 1.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Mar 26, 2015
  • Latest release: Dec 14, 2020
  • Number of updates: 37
  • Update frequency: every 56.5 days
  • Top authors: bgermann (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /8,703 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▼0.08ms] Passed 4 tests

Analyzing server-side resources used by Really Simple CAPTCHA for cformsII
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4748.79 ▲7.01
Dashboard /wp-admin3.80 ▲0.4955.27 ▼1.59
Posts /wp-admin/edit.php3.85 ▲0.4952.05 ▼5.91
Add New Post /wp-admin/post-new.php6.32 ▲0.43108.61 ▲2.13
Media Library /wp-admin/upload.php3.66 ▲0.4341.83 ▲5.05
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.8737.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Really Simple CAPTCHA for cformsII
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8714.35 ▼0.372.06 ▲0.2745.18 ▲0.85
Dashboard /wp-admin2,229 ▲525.52 ▼0.0892.03 ▼4.8242.22 ▲0.83
Posts /wp-admin/edit.php2,143 ▲432.05 ▼0.0935.20 ▼8.0040.40 ▲7.44
Add New Post /wp-admin/post-new.php1,556 ▲3023.36 ▲0.24692.64 ▲40.3166.78 ▲10.11
Media Library /wp-admin/upload.php1,445 ▲454.26 ▲0.0899.28 ▼8.4647.06 ▼1.86
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0022.0525.4430.35

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
  • This plugin cannot be uninstalled
    • > Notice in wp-includes/option.php+2520
    Trying to access array offset on value of type null
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cforms2-really-simple-captcha/cforms2_really_simple_captcha.php:308
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/cforms2-really-simple-captcha/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: protection, captcha, verification, cforms2, cformsii...

cforms2-really-simple-captcha/cforms2_really_simple_captcha.php 92% from 13 tests

The main PHP script in "Really Simple CAPTCHA for cformsII" version 1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cforms2-really-simple-captcha.php" instead of "cforms2_really_simple_captcha.php")

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
Success! There were no dangerous files found in this plugin2,007 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35511,6761,987
JavaScript254420

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity43.88
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods118
▷ Static methods86.78%
▷ Public methods9177.12%
▷ Protected methods2319.49%
▷ Private methods43.39%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin