84% jcp-user-consent

Code Review | JCP User Consent

WordPress plugin JCP User Consent scored84%from 54 tests.

About plugin

  • Plugin page: jcp-user-consent
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-4.9.6
  • WordPress version: 6.3.1
  • First release: May 28, 2018
  • Latest release: May 28, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: dc5ala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /712 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.04MB] [CPU: ▼3.57ms] Passed 4 tests

This is a short check of server-side resources used by JCP User Consent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.63 ▼0.67
Dashboard /wp-admin3.35 ▲0.0445.82 ▲0.83
Posts /wp-admin/edit.php3.40 ▲0.0443.05 ▼5.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.45 ▼9.05
Media Library /wp-admin/upload.php3.27 ▲0.0437.59 ▲1.72

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for JCP User Consent
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.121.71 ▼0.1442.21 ▲3.91
Dashboard /wp-admin2,195 ▲155.58 ▲0.0783.59 ▼6.9037.00 ▼3.65
Posts /wp-admin/edit.php2,079 ▼242.03 ▲0.0035.25 ▼10.5330.69 ▼10.00
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▼0.12603.18 ▼11.0065.75 ▼22.01
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.00100.10 ▼1.8240.82 ▼3.59

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× 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/jcp-user-consent/jcp-user-consent.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
3 plugin tags: registration, gdpr, consent

jcp-user-consent/jcp-user-consent.php Passed 13 tests

"JCP User Consent" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
General Data Protection Regulations adjustments for user registration

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin220 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13841164
PO File1172056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin