10% photo-express-for-google

Code Review | Photo Express for Google

WordPress plugin Photo Express for Google scored10%from 54 tests.

About plugin

  • Plugin page: photo-express-for...
  • Plugin version: 0.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.2.4
  • WordPress version: 6.3.1
  • First release: May 26, 2015
  • Latest release: Aug 30, 2015
  • Number of updates: 18
  • Update frequency: every 5.6 days
  • Top authors: thhake (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

400+ active /20,707 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/photo-express-for-google/photo-express.php+250
    Cannot redeclare str_starts_with() (previously declared in wp-includes/compat.php:458)

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Photo Express for Google
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.65 ▼5.31
Dashboard /wp-admin3.31 ▲0.0045.28 ▼6.25
Posts /wp-admin/edit.php3.36 ▲0.0049.29 ▼0.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.92 ▼9.29
Media Library /wp-admin/upload.php3.23 ▲0.0037.00 ▲5.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Photo Express for Google: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.58 ▼1.161.53 ▼0.4851.22 ▲5.89
Dashboard /wp-admin2,206 ▲214.87 ▼0.94106.69 ▼10.5341.95 ▼3.40
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0839.74 ▲3.5734.42 ▼4.81
Add New Post /wp-admin/post-new.php1,542 ▲918.38 ▼4.67603.09 ▼86.9552.28 ▼10.90
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0293.91 ▼10.8043.22 ▼0.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/photo-express-for-google/class-google-photo-access.php+246
    Undefined index: peg_access_token
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'photo_express\\Feed_Fetcher' not found in wp-content/plugins/photo-express-for-google/class-ssl-enforcer.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function photo_express\\plugin_dir_path() in wp-content/plugins/photo-express-for-google/class-google-photo-access.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function photo_express\\plugin_dir_path() in wp-content/plugins/photo-express-for-google/class-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function photo_express\\plugin_dir_path() in wp-content/plugins/photo-express-for-google/class-simple-cache.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function photo_express\\plugin_dir_path() in wp-content/plugins/photo-express-for-google/class-photo-renderer.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Opening the album/image selection dialog), #2 (Album selection dialog - either open an album to view/select individual), #3 (Photo selection dialog - select one or more photos to insert into the post,), #4 (Plugin settings), #5 (An example of the phototile gallery layout)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === photo-express-for-google === )
  • Tags: You are using too many tags: 33 tag instead of maximum 10
You can look at the official readme.txt

photo-express-for-google/photo-express.php 69% from 13 tests

The main PHP script in "Photo Express for Google" version 0.3.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("//")
  • 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
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("photo-express-for-google.php" instead of "photo-express.php")

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 plugin7,487 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,0815224,052
PHP114689852,704
CSS512495642
Markdown114052
HTML1191136
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity37.50
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods101
▷ Static methods43.96%
▷ Public methods9493.07%
▷ Protected methods00.00%
▷ Private methods76.93%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 2.85MB with 1.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png663.58KB239.71KB▼ 63.88%
screenshot-5.png1,319.03KB437.01KB▼ 66.87%
screenshot-4.png425.62KB191.83KB▼ 54.93%
photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%
screenshot-3.png453.50KB203.08KB▼ 55.22%