79% tapcha

Code Review | Tapcha

WordPress plugin Tapcha scored79%from 54 tests.

About plugin

  • Plugin page: tapcha
  • Plugin version: 0.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Feb 10, 2020
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: tapcha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Tapcha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.10 ▲5.83
Dashboard /wp-admin3.33 ▼0.0249.77 ▼13.64
Posts /wp-admin/edit.php3.44 ▲0.0948.17 ▲2.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.56 ▼12.19
Media Library /wp-admin/upload.php3.25 ▲0.0231.56 ▼4.88
Tapcha /wp-admin/options-general.php?page=tapcha-options3.2535.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
tapcha_options_group
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Tapcha
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.051.88 ▲0.1245.17 ▲4.08
Dashboard /wp-admin2,202 ▲315.56 ▼0.0492.22 ▲1.0041.02 ▲2.21
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0134.17 ▼0.9133.49 ▼3.25
Add New Post /wp-admin/post-new.php1,531 ▲323.38 ▲0.21670.86 ▲33.0450.65 ▼2.43
Media Library /wp-admin/upload.php1,407 ▲44.13 ▼0.0496.81 ▼7.2445.66 ▲0.55
Tapcha /wp-admin/options-general.php?page=tapcha-options8602.1623.4227.85

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • tapcha_options_group
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tapcha/tapcha.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tapcha/admin/includes/field-site-key.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tapcha/admin/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tapcha/admin/includes/admin-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tapcha/admin/includes/section-credentials.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tapcha/admin/includes/field-admin-key.php:1

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: contact form 7, captcha

tapcha/tapcha.php Passed 13 tests

The main PHP file in "Tapcha" ver. 0.4.0 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
A gesture based CAPTCHA scheme. Integrates with Contact Form 7

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
There were no executable files found in this plugin1,161 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59157670
PHP109020350
CSS33677
PO File1231164

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin