94% wp-mucaptcha

Code Review | μcaptcha

WordPress plugin μcaptcha scored 94% from 54 tests.

About plugin

  • Plugin page: wp-mucaptcha
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.4
  • WordPress version: 5.8.1
  • First release: Nov 15, 2015
  • Latest release: Mar 9, 2020
  • Number of updates: 14
  • Update frequency: every 112.9 days
  • Top authors: luileito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,011 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼134.21ms] Passed 4 tests

This is a short check of server-side resources used by μcaptcha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.17 ▲17.85
Dashboard /wp-admin3.08 ▲0.0249.53 ▲5.46
Posts /wp-admin/edit.php3.13 ▲0.0158.00 ▲5.30
Add New Post /wp-admin/post-new.php5.44 ▲0.0094.52 ▼549.09
Media Library /wp-admin/upload.php3.02 ▲0.0231.61 ▲1.48
μcaptcha /wp-admin/plugins.php?page=mucaptcha_config3.0132.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for μcaptcha
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,744 ▲10815.59 ▼0.408.83 ▲0.0847.83 ▼5.30
Dashboard /wp-admin2,980 ▲465.88 ▼0.08133.67 ▼4.78117.44 ▼0.32
Posts /wp-admin/edit.php2,764 ▲252.67 ▼0.0262.05 ▼2.9098.09 ▼1.47
Add New Post /wp-admin/post-new.php1,507 ▼16518.55 ▼0.41356.71 ▼19.24128.65 ▲15.06
Media Library /wp-admin/upload.php1,743 ▼674.99 ▼0.05143.92 ▼13.03124.59 ▼2.33
μcaptcha /wp-admin/plugins.php?page=mucaptcha_config1,3282.2559.2777.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-mucaptcha/admin/form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-mucaptcha/admin/save.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-mucaptcha/admin/form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-mucaptcha/wp-mucaptcha.php:130

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-mucaptcha === )
You can look at the official readme.txt

wp-mucaptcha/wp-mucaptcha.php 92% from 13 tests

The entry point to "μcaptcha" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected572 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64141369
PO File25666161
JavaScript101322
Bourne Shell17320

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin