89% gdpr-cache-scripts-styles

Code Review | GDPR Cache Scripts & Styles

WordPress plugin GDPR Cache Scripts & Styles scored89%from 54 tests.

About plugin

  • Plugin page: gdpr-cache-script...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2022
  • Latest release: Jan 24, 2023
  • Number of updates: 17
  • Update frequency: every 7.7 days
  • Top authors: stracker.phil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /976 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.12ms] Passed 4 tests

This is a short check of server-side resources used by GDPR Cache Scripts & Styles
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2442.57 ▼0.30
Dashboard /wp-admin3.54 ▲0.2351.18 ▲0.09
Posts /wp-admin/edit.php3.65 ▲0.3048.36 ▼1.97
Add New Post /wp-admin/post-new.php6.12 ▲0.2388.63 ▼6.31
Media Library /wp-admin/upload.php3.46 ▲0.2338.55 ▲2.27
GDPR Cache /wp-admin/tools.php?page=gdpr-cache3.4934.93

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GDPR Cache Scripts & Styles
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.54 ▼0.841.69 ▼0.0148.31 ▲3.60
Dashboard /wp-admin2,225 ▲195.83 ▼0.0796.18 ▼11.9240.32 ▼4.37
Posts /wp-admin/edit.php2,104 ▲12.05 ▼0.0040.23 ▲1.8233.25 ▼3.86
Add New Post /wp-admin/post-new.php1,548 ▲322.95 ▼0.23673.16 ▲26.6854.38 ▼12.69
Media Library /wp-admin/upload.php1,404 ▲74.25 ▲0.0496.52 ▼11.8642.58 ▼4.08
GDPR Cache /wp-admin/tools.php?page=gdpr-cache8082.0525.9430.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

gdpr-cache-scripts-styles/plugin.php 85% from 13 tests

Analyzing the main PHP file in "GDPR Cache Scripts & Styles" version 1.0.7
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gdpr-cache-scripts-styles.php" instead of "plugin.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,786 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP124821,1501,281
JavaScript148107413
CSS126392

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
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
Namespaces1
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%
Functions69
▷ Named functions6695.65%
▷ Anonymous functions34.35%
Constants20
▷ Global constants1155.00%
▷ Class constants945.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin