94% mailster-recaptcha

Code Review | Mailster reCaptcha

WordPress plugin Mailster reCaptcha scored 94% from 54 tests.

About plugin

  • Plugin page: mailster-recaptcha
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Jan 13, 2017
  • Latest release: Jan 28, 2022
  • Number of updates: 49
  • Update frequency: every 37.6 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 15,892 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼292.46ms] Passed 4 tests

An overview of server-side resources used by Mailster reCaptcha
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0451.14 ▼2.87
Dashboard /wp-admin3.46 ▲0.0532.11 ▼3.08
Posts /wp-admin/edit.php3.68 ▲0.0438.22 ▼4.18
Add New Post /wp-admin/post-new.php6.93 ▼0.0594.17 ▼1,158.93
Media Library /wp-admin/upload.php3.33 ▲0.0325.76 ▼3.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Mailster reCaptcha
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1915.89 ▲0.275.80 ▼0.042.21 ▼0.34
Dashboard /wp-admin2,889 ▲286.20 ▲0.02123.07 ▼8.63157.81 ▼7.01
Posts /wp-admin/edit.php2,694 ▼03.23 ▼0.0163.19 ▼1.36141.52 ▼1.69
Add New Post /wp-admin/post-new.php1,781 ▲2922.00 ▲0.48433.49 ▼14.94157.53 ▼0.76
Media Library /wp-admin/upload.php1,698 ▼05.51 ▲0.00142.53 ▼1.67193.83 ▲1.36

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 successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-recaptcha/classes/recaptcha.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mailster-recaptcha/views/settings.php:4

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)
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: captcha, secure, mailster, form, recaptcha

mailster-recaptcha/mailster-recaptcha.php Passed 13 tests

The main file in "Mailster reCaptcha" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Adds a reCaptcha™ to your Mailster Subscription forms

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
Good job! No executable or dangerous file extensions detected247 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35610247

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ 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 are no PNG files in this plugin