88% dat-pass

Code Review | Dat Pass

WordPress plugin Dat Pass scored 88% from 54 tests.

About plugin

  • Plugin page: dat-pass
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.8+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Dec 22, 2020
  • Latest release: Aug 22, 2021
  • Number of updates: 6
  • Update frequency: every 40.7 days
  • Top authors: nhomcaodem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 333 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼136.63ms] Passed 4 tests

Server-side resources used by Dat Pass
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1437.22 ▲9.42
Dashboard /wp-admin3.08 ▲0.0344.90 ▲4.53
Posts /wp-admin/edit.php3.14 ▲0.0346.47 ▲4.82
Add New Post /wp-admin/post-new.php5.45 ▲0.0295.33 ▼546.62
Media Library /wp-admin/upload.php3.03 ▲0.0233.19 ▼9.23
Dat Pass /wp-admin/options-general.php?page=datpass-options2.9729.66

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Dat Pass
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲8915.92 ▲0.348.25 ▼2.6146.31 ▼3.15
Dashboard /wp-admin2,994 ▲605.95 ▼0.16136.25 ▼11.16116.17 ▲3.53
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0067.09 ▲0.4791.47 ▲4.02
Add New Post /wp-admin/post-new.php1,618 ▼25421.76 ▲2.63269.42 ▼93.37103.12 ▼10.50
Media Library /wp-admin/upload.php1,827 ▲174.99 ▼0.01149.68 ▲7.33117.41 ▼8.36
Dat Pass /wp-admin/options-general.php?page=datpass-options1,1462.0554.81134.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=datpass-options
    • > Notice in wp-content/plugins/dat-pass/inc/datpass-admin.php+16
    Trying to access array offset on value of type bool

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dat-pass/inc/datpass-admin.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dat-pass/dat-pass.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dat-pass/inc/datpass-content.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in dat-pass/assets to your readme.txt
The official readme.txt might help

dat-pass/dat-pass.php Passed 13 tests

"Dat Pass" version 1.1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
17 characters long description:
Content is locked

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
Everything looks great! No dangerous files found in this plugin255 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS121105
PHP302092
PO File2204057
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/datpass.png29.46KB9.72KB▼ 67.02%