84% mighty-captcha

Code Review | Mighty CAPTCHA

WordPress plugin Mighty CAPTCHA scored84%from 54 tests.

About plugin

  • Plugin page: mighty-captcha
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Oct 9, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Sabaoh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Mighty CAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.51 ▼2.87
Dashboard /wp-admin3.37 ▲0.0756.90 ▲2.13
Posts /wp-admin/edit.php3.48 ▲0.1350.05 ▼7.66
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.93 ▼11.01
Media Library /wp-admin/upload.php3.29 ▲0.0638.19 ▲4.32
Mighty CAPTCHA /wp-admin/plugins.php?page=mighty-captcha3.2632.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 13 new options
New WordPress options
can_compress_scripts
mighty_captcha_site_key
mighty_captcha_login_compact
widget_recent-posts
mighty_captcha_sign_up_compact
mighty_captcha_comment_form
mighty_captcha_login_panel
db_upgraded
mighty_captcha_sign_up
mighty_captcha_secret_key
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mighty CAPTCHA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.18 ▼0.118.69 ▲6.9443.61 ▲0.66
Dashboard /wp-admin2,193 ▲165.53 ▼0.1484.93 ▼3.0839.12 ▼2.05
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0133.54 ▼8.8836.19 ▼1.68
Add New Post /wp-admin/post-new.php1,529 ▲323.42 ▲0.41647.30 ▼45.6053.14 ▼1.18
Media Library /wp-admin/upload.php1,404 ▲134.24 ▼0.0695.87 ▼5.5844.43 ▼0.23
Mighty CAPTCHA /wp-admin/plugins.php?page=mighty-captcha8772.1222.1630.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • mighty_captcha_login_compact
    • can_compress_scripts

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

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mighty-captcha/mighty-captcha.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/mighty-captcha/uninstall.php:24

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: login, register, comments, user, google...

mighty-captcha/mighty-captcha.php 92% from 13 tests

The main PHP file in "Mighty CAPTCHA" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 251 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin358 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP242119237
PO File1222383
CSS2184438

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin