84% recaptcha-wp

Code Review | Recaptcha - wp

WordPress plugin Recaptcha - wp scored84%from 54 tests.

About plugin

  • Plugin page: recaptcha-wp
  • Plugin version: 0.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2014
  • Latest release: Sep 12, 2016
  • Number of updates: 19
  • Update frequency: every 33.8 days
  • Top authors: rozx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by Recaptcha - wp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.23 ▲5.69
Dashboard /wp-admin3.32 ▲0.0145.96 ▼3.12
Posts /wp-admin/edit.php3.37 ▲0.0143.40 ▼0.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.78 ▼6.75
Media Library /wp-admin/upload.php3.24 ▲0.0132.92 ▼1.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Recaptcha - wp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.26 ▼1.031.74 ▼0.0744.54 ▼0.50
Dashboard /wp-admin2,206 ▲144.85 ▼0.19112.65 ▲5.7543.48 ▲1.60
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0234.01 ▼3.4133.39 ▲1.60
Add New Post /wp-admin/post-new.php1,514 ▼617.54 ▼5.60655.98 ▼18.9855.15 ▼2.22
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.0894.01 ▼11.0641.38 ▼7.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Even though no errors were found, 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recaptcha-wp/recaptcha-wp.php:12

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 ('/assets/screenshot1.png')
  • Screenshots: Please a description for screenshot #0 in recaptcha-wp/assets to your readme.txt
You can take inspiration from this readme.txt

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

"Recaptcha - wp" version 0.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
A wordpress Plugin enable google reCAPTCHA in your wordpress Site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1532375

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin