84% profile-picture-privacy-controls

Code Review | Profile Picture Privacy Controls

WordPress plugin Profile Picture Privacy Controls scored84%from 54 tests.

About plugin

  • Plugin page: profile-picture-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 15, 2018
  • Latest release: Oct 15, 2018
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: allendav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.59ms] Passed 4 tests

Analyzing server-side resources used by Profile Picture Privacy Controls
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.30 ▲1.29
Dashboard /wp-admin3.34 ▲0.0348.48 ▼7.26
Posts /wp-admin/edit.php3.39 ▲0.0351.79 ▼1.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.38 ▼14.83
Media Library /wp-admin/upload.php3.26 ▲0.0337.31 ▲2.25

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Profile Picture Privacy Controls
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4413.37 ▼1.031.89 ▼0.1841.89 ▼2.11
Dashboard /wp-admin2,206 ▲244.81 ▼1.16109.31 ▲2.5937.67 ▼6.88
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.23 ▼9.1936.35 ▼2.75
Add New Post /wp-admin/post-new.php1,533 ▲1922.98 ▲5.60628.67 ▼57.7450.89 ▼2.57
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.09104.91 ▼3.3044.35 ▲0.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/profile-picture-privacy-controls/profile-picture-privacy-controls.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: gravatar, privacy

profile-picture-privacy-controls/profile-picture-privacy-controls.php Passed 13 tests

The main file in "Profile Picture Privacy Controls" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
113 characters long description:
Gives users control over whether or not to opt-in to Gravatar. Avoids revealing Gravatars to logged-out visitors.

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
Good job! No executable or dangerous file extensions detected170 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13616170

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods872.73%
▷ Protected methods19.09%
▷ Private methods218.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mystery.png1.76KB0.84KB▼ 52.49%