83% preeco-widgets

Code Review | preeco GDPR Widgets

WordPress plugin preeco GDPR Widgets scored83%from 54 tests.

About plugin

  • Plugin page: preeco-widgets
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-5.7
  • WordPress version: 6.3.1
  • First release: May 1, 2020
  • Latest release: Mar 3, 2021
  • Number of updates: 10
  • Update frequency: every 30.8 days
  • Top authors: preeco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /459 total downloads

Benchmarks

Plugin footprint 83% from 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.12MB] [CPU: ▼0.10ms] Passed 4 tests

This is a short check of server-side resources used by preeco GDPR Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.48 ▲4.28
Dashboard /wp-admin3.43 ▲0.0844.19 ▼6.85
Posts /wp-admin/edit.php3.54 ▲0.1849.25 ▲1.20
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.15 ▲3.18
Media Library /wp-admin/upload.php3.35 ▲0.1234.48 ▲2.08
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=preeco_widgets3.3433.31
preeco Widgets /wp-admin/options-general.php?page=preeco-widgets3.3231.73
Add New /wp-admin/post-new.php?post_type=preeco_widgets3.4347.16
All Widgets /wp-admin/edit.php?post_type=preeco_widgets3.3934.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by preeco GDPR Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.28 ▼1.091.84 ▲0.1941.86 ▲5.18
Dashboard /wp-admin2,275 ▲895.90 ▲0.95109.74 ▼45.2241.57 ▼14.03
Posts /wp-admin/edit.php2,158 ▲662.13 ▲0.1339.80 ▲1.6034.12 ▼1.83
Add New Post /wp-admin/post-new.php1,550 ▲3623.40 ▲5.76630.04 ▼8.5856.30 ▲1.76
Media Library /wp-admin/upload.php1,452 ▲614.23 ▲0.00100.96 ▲2.3941.74 ▼1.20
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=preeco_widgets1,3762.1727.0528.84
preeco Widgets /wp-admin/options-general.php?page=preeco-widgets8822.0725.8126.41
Add New /wp-admin/post-new.php?post_type=preeco_widgets2,0404.2686.5252.06
All Widgets /wp-admin/edit.php?post_type=preeco_widgets1,1431.9732.7131.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/preeco-widgets/admin/partials/preeco-widgets-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

preeco-widgets/preeco-widgets.php 92% from 13 tests

The main PHP file in "preeco GDPR Widgets" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin513 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11123288420
PO File1263273
CSS1349
SVG1008
JavaScript12273

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3081.08%
▷ Protected methods38.11%
▷ Private methods410.81%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.51MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png75.68KB22.20KB▼ 70.67%
assets/screenshot-1.png150.89KB72.12KB▼ 52.20%
assets/banner-772x250.png36.50KB11.02KB▼ 69.81%
assets/screenshot-2.png258.25KB53.90KB▼ 79.13%
assets/icon-128x128.png0.94KB0.20KB▼ 78.61%