88% mailster-cool-captcha

Code Review | Mailster Cool Captcha

WordPress plugin Mailster Cool Captcha scored 88% from 54 tests.

About plugin

  • Plugin page: mailster-cool-cap...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.8.1
  • First release: Jan 13, 2017
  • Latest release: Jan 28, 2022
  • Number of updates: 23
  • Update frequency: every 80.0 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 2,448 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼143.29ms] Passed 4 tests

A check of server-side resources used by Mailster Cool Captcha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0724.60 ▲2.25
Dashboard /wp-admin3.14 ▲0.0731.54 ▼4.54
Posts /wp-admin/edit.php3.19 ▲0.0829.85 ▼0.63
Add New Post /wp-admin/post-new.php5.50 ▲0.0667.76 ▼570.25
Media Library /wp-admin/upload.php3.08 ▲0.0827.01 ▲4.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Mailster Cool Captcha
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲5015.64 ▲0.015.48 ▼0.2576.05 ▼0.37
Dashboard /wp-admin2,930 ▲346.16 ▲0.02115.75 ▼17.26166.37 ▼6.04
Posts /wp-admin/edit.php2,706 ▼313.24 ▼0.1165.40 ▼0.17129.26 ▼5.62
Add New Post /wp-admin/post-new.php3,735 ▲3118.12 ▼0.84445.95 ▼3.07159.31 ▼7.55
Media Library /wp-admin/upload.php1,752 ▼05.57 ▲0.00145.63 ▲0.06184.48 ▲1.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mailster-cool-captcha/captcha/tools/dictionary-import/importwords.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mailster-cool-captcha/captcha/tools/dictionary-import/importwords.php on line 22
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/mailster-cool-captcha/captcha/tools/dictionary-import/importwords.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-cool-captcha/classes/cool-captcha.class.php:10
    • > PHP Notice
      Undefined variable: argc in wp-content/plugins/mailster-cool-captcha/captcha/tools/dictionary-import/importwords.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: form, secure, forms, recaptcha, captcha...

mailster-cool-captcha/mailster-cool-captcha.php 92% from 13 tests

The main PHP file in "Mailster Cool Captcha" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • 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

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 plugin617 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP625093,804617

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity32.00
▷ Minimum class complexity30.00
▷ Maximum class complexity34.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1460.87%
▷ Protected methods939.13%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin