84% doi-helper

Code Review | Double Opt-In Helper

WordPress plugin Double Opt-In Helper scored84%from 54 tests.

About plugin

  • Plugin page: doi-helper
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 10, 2021
  • Latest release: May 20, 2023
  • Number of updates: 4
  • Update frequency: every 140.2 days
  • Top authors: takayukister (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.87ms] Passed 4 tests

Analyzing server-side resources used by Double Opt-In Helper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.29 ▼2.70
Dashboard /wp-admin3.36 ▲0.0548.19 ▼6.28
Posts /wp-admin/edit.php3.41 ▲0.0546.75 ▼0.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.55 ▼21.95
Media Library /wp-admin/upload.php3.28 ▲0.0534.16 ▲2.72

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

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

Browser metrics Passed 4 tests

Double Opt-In Helper: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.794.52 ▲2.0241.76 ▼8.89
Dashboard /wp-admin2,200 ▲125.77 ▼0.11103.28 ▼10.0841.23 ▼3.05
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0539.97 ▼1.5534.64 ▼1.56
Add New Post /wp-admin/post-new.php1,514 ▼2817.79 ▼0.36589.56 ▼18.6050.43 ▼9.47
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0198.30 ▼10.4839.71 ▼6.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/doi-helper/doi-helper.php:38

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: privacy, opt-in, consent

doi-helper/doi-helper.php Passed 13 tests

The principal PHP file in "Double Opt-In Helper" v. 1.0 is loaded by WordPress automatically on each request
94 characters long description:
A WordPress plugin that helps developers implement the double opt-in process in their plugins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected214 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17861214

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin