83% dw-gdpr

Code Review | DW GDPR

WordPress plugin DW GDPR scored 83% from 54 tests.

About plugin

  • Plugin page: dw-gdpr
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 5.9.2
  • First release: Jun 1, 2018
  • Latest release: Jun 1, 2018
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,189 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
Install script ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼292.42ms] Passed 4 tests

This is a short check of server-side resources used by DW GDPR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5052.25 ▼1.24
Dashboard /wp-admin3.88 ▲0.4734.83 ▲1.62
Posts /wp-admin/edit.php4.17 ▲0.5338.54 ▲2.65
Add New Post /wp-admin/post-new.php7.41 ▲0.4494.87 ▼1,172.71
Media Library /wp-admin/upload.php3.83 ▲0.5329.97 ▲4.40
All GDPR Activities /wp-admin/edit.php?post_type=dw_gdpr_activities3.8734.75
Settings /wp-admin/edit.php?post_type=dw_gdpr_activities&page=dw-gdpr-settings3.8126.18

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 295 new files
Database: no new tables, 1 new option
New WordPress options
dw_gdpr_email

Browser metrics Passed 4 tests

This is an overview of browser requirements for DW GDPR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲5315.94 ▲0.186.94 ▲1.042.18 ▼0.21
Dashboard /wp-admin2,928 ▲676.05 ▼0.05118.38 ▼16.91151.56 ▼11.83
Posts /wp-admin/edit.php2,724 ▲333.24 ▲0.0063.30 ▼0.45134.00 ▼14.46
Add New Post /wp-admin/post-new.php1,684 ▼7616.85 ▼5.39387.39 ▼37.05152.67 ▼4.81
Media Library /wp-admin/upload.php1,735 ▲345.57 ▲0.06174.11 ▲36.06190.53 ▲8.73
All GDPR Activities /wp-admin/edit.php?post_type=dw_gdpr_activities1,4433.2060.00115.19
Settings /wp-admin/edit.php?post_type=dw_gdpr_activities&page=dw-gdpr-settings1,2462.5555.27165.62

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • dw_gdpr_email

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 items
  • 103× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Shared/trend/powerBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_RichText_TextElement' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/RichText/Run.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_RichText_ITextElement' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/RichText/TextElement.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/CachedObjectStorage/Memory.php:28
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Shared/trend/linearBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Exception' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Reader/Exception.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_Writer_IWriter' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Writer/PDF.php:28
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/linearBestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Shared/trend/trendClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_IComparable' not found in wp-content/plugins/dw-gdpr/libs/phpexcel/PHPExcel/Worksheet.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: Please describe screenshot #7 in dw-gdpr/assets to your readme.txt
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

dw-gdpr/dw-gdpr.php 92% from 13 tests

The main file in "DW GDPR" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)

Code Analysis 95% from 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 plugin61,697 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP23311,52635,93461,091
CSS39017460
HTML30079
JavaScript613167

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,019)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity48.19
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes220
▷ Abstract classes104.55%
▷ Concrete classes21095.45%
▷ Final classes00.00%
Methods3,021
▷ Static methods63220.92%
▷ Public methods2,42980.40%
▷ Protected methods802.65%
▷ Private methods51216.95%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants813
▷ Global constants11914.64%
▷ Class constants69485.36%
▷ Public constants694100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/dw-gdpr-logo.png116.59KB60.57KB▼ 48.05%