84% photos-picker

Code Review | Google Photos Picker

WordPress plugin Google Photos Picker scored 84% from 54 tests.

About plugin

  • Plugin page: photos-picker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Apr 25, 2016
  • Number of updates: 6
  • Update frequency: every 11.7 days
  • Top authors: iwongu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 1,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.23ms] Passed 4 tests

Server-side resources used by Google Photos Picker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.76 ▼3.29
Dashboard /wp-admin3.33 ▲0.0247.65 ▼3.93
Posts /wp-admin/edit.php3.38 ▲0.0249.18 ▲3.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.76 ▼14.14
Media Library /wp-admin/upload.php3.25 ▲0.0234.62 ▼3.54

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

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

Browser metrics Passed 4 tests

Google Photos Picker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.62 ▼0.741.74 ▼0.1541.44 ▼6.24
Dashboard /wp-admin2,206 ▲215.91 ▲0.03106.00 ▲0.4840.19 ▼4.47
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0138.83 ▲2.1534.74 ▲0.12
Add New Post /wp-admin/post-new.php1,542 ▼018.21 ▼0.08655.36 ▼14.9066.18 ▲9.30
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0498.70 ▼14.2740.67 ▼5.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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photos-picker/googlephotospicker.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: post, images, google photos

photos-picker/googlephotospicker.php 85% from 13 tests

This is the main PHP file of "Google Photos Picker" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("photos-picker.php" instead of "googlephotospicker.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 215 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin177 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22715121
JavaScript110255
Markdown1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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
Namespaces0
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.32MB with 0.25MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png103.60KB24.29KB▼ 76.55%
assets/screenshot-1.png82.67KB16.89KB▼ 79.57%
assets/screenshot-2.png138.48KB32.24KB▼ 76.72%