84% simple-google-photos-grid

Code Review | Simple Google Photos Grid

WordPress plugin Simple Google Photos Grid scored84%from 54 tests.

About plugin

  • Plugin page: simple-google-pho...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 25, 2017
  • Latest release: Nov 4, 2019
  • Number of updates: 8
  • Update frequency: every 89.0 days
  • Top authors: uwonder (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /7,202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.82ms] Passed 4 tests

This is a short check of server-side resources used by Simple Google Photos Grid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.66 ▲0.29
Dashboard /wp-admin3.36 ▲0.0646.45 ▼1.54
Posts /wp-admin/edit.php3.48 ▲0.1248.52 ▼0.46
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.25 ▼25.58
Media Library /wp-admin/upload.php3.29 ▲0.0541.00 ▲10.16

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Google Photos Grid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.37 ▼1.031.72 ▼0.0343.77 ▲2.95
Dashboard /wp-admin2,206 ▲215.91 ▼0.00107.38 ▲5.3137.73 ▼6.94
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0338.95 ▲3.1637.33 ▲0.92
Add New Post /wp-admin/post-new.php1,532 ▲1823.23 ▲5.74638.85 ▼3.1763.73 ▲14.09
Media Library /wp-admin/upload.php1,385 ▲34.20 ▼0.0792.05 ▼4.9140.20 ▼2.62

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

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

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-google-photos-grid/simple-google-photos-grid-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-photos-grid/simple-google-photos-grid.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: gallery, album, google photos, photos

simple-google-photos-grid/simple-google-photos-grid.php Passed 13 tests

"Simple Google Photos Grid" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
57 characters long description:
Show the latest photos from a public Google Photos album.

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
No dangerous file extensions were detected265 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP556110238
Markdown111027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.67
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods1071.43%
▷ Protected methods428.57%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin