72% nmedia-gdpr

Code Review | N-Mediaa WordPress GDPR

WordPress plugin N-Mediaa WordPress GDPR scored72%from 54 tests.

About plugin

  • Plugin page: nmedia-gdpr
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: May 30, 2018
  • Latest release: Mar 14, 2021
  • Number of updates: 7
  • Update frequency: every 145.6 days
  • Top authors: nmedia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /747 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.08MB] [CPU: ▼8.15ms] Passed 4 tests

A check of server-side resources used by N-Mediaa WordPress GDPR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.45 ▼2.13
Dashboard /wp-admin3.39 ▲0.0543.14 ▼15.54
Posts /wp-admin/edit.php3.50 ▲0.1550.15 ▲3.85
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.05 ▼14.52
Media Library /wp-admin/upload.php3.31 ▲0.0935.55 ▼0.41
WP GDPR /wp-admin/options-general.php?page=nm-gdpr-settings3.2832.70

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

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

Browser metrics Passed 4 tests

N-Mediaa WordPress GDPR: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.141.79 ▲0.1944.95 ▲4.92
Dashboard /wp-admin2,207 ▲195.84 ▲0.9497.29 ▼12.7437.60 ▼3.68
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0439.22 ▲4.5134.66 ▼1.59
Add New Post /wp-admin/post-new.php1,517 ▼1617.71 ▼5.47679.82 ▲66.7064.24 ▲13.67
Media Library /wp-admin/upload.php1,395 ▲44.17 ▼0.0098.60 ▼0.4742.06 ▼1.27
WP GDPR /wp-admin/options-general.php?page=nm-gdpr-settings9742.1236.9751.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/nmedia-gdpr/inc/helpers.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/nmedia-gdpr/js/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/nmedia-gdpr/templates/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/nmedia-gdpr/inc/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/nmedia-gdpr/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/nmedia-gdpr/css/index.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=nm-gdpr-settings
    • > Network (severe)
    wp-content/plugins/nmedia-gdpr/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=nm-gdpr-settings
    • > Network (severe)
    wp-content/plugins/nmedia-gdpr/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=nm-gdpr-settings
    • > Network (severe)
    wp-content/plugins/nmedia-gdpr/css/images/ui-bg_glass_65_ffffff_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=nm-gdpr-settings
    • > Network (severe)
    wp-content/plugins/nmedia-gdpr/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: user data privacy, user consent, wordpress gdpr, gdpr, privacy policy

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

The principal PHP file in "N-Mediaa WordPress GDPR" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • 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 a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin5,328 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,1402884,395
CSS45179541
PHP415455392

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.50
▷ Minimum class complexity13.00
▷ Maximum class complexity38.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/select2.png0.60KB0.99KB0.00%