72% gphotos

Code Review | GPhotos

WordPress plugin GPhotos scored72%from 54 tests.

About plugin

  • Plugin page: gphotos
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Feb 5, 2013
  • Number of updates: 56
  • Update frequency: every 0.8 days
  • Top authors: c-plusweb.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.13MB] [CPU: ▼21.23ms] Passed 4 tests

This is a short check of server-side resources used by GPhotos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.38 ▼2.98
Dashboard /wp-admin3.19 ▼0.1531.70 ▼34.72
Posts /wp-admin/edit.php3.33 ▼0.0335.19 ▼15.27
Add New Post /wp-admin/post-new.php5.52 ▼0.3671.75 ▼25.68
Media Library /wp-admin/upload.php3.26 ▲0.0328.87 ▼9.26
Add a picture /wp-admin/post-new.php?post_type=slide3.3749.77
GPhotos /wp-admin/edit.php?post_type=slide3.3636.37
GPhotos Settings /wp-admin/options-general.php?page=id_GPhotos3.1726.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GPhotos
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,054 ▲30814.62 ▼0.0518.80 ▲16.7641.13 ▼13.61
Dashboard /wp-admin2,242 ▲544.92 ▼0.98103.24 ▼8.6985.75 ▲41.58
Posts /wp-admin/edit.php2,122 ▲301.97 ▼0.0334.55 ▼5.8630.00 ▼5.07
Add New Post /wp-admin/post-new.php1,696 ▲17722.39 ▼1.05737.10 ▲68.2347.99 ▼8.08
Media Library /wp-admin/upload.php1,418 ▲304.21 ▲0.07105.79 ▼11.8267.18 ▲18.61
Add a picture /wp-admin/post-new.php?post_type=slide1,8153.7565.6981.05
GPhotos /wp-admin/edit.php?post_type=slide1,1161.9532.3432.28
GPhotos Settings /wp-admin/options-general.php?page=id_GPhotos1,1742.0626.0329.40

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=id_GPhotos
    • > Notice in wp-content/plugins/gphotos/photos.php+58
    Undefined index: post_type

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 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/gphotos/photos.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=id_GPhotos
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=id_GPhotos 223 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=id_GPhotos
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=id_GPhotos 228 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=id_GPhotos
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=id_GPhotos 238 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=id_GPhotos
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=id_GPhotos 253 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

gphotos/photos.php 92% from 13 tests

The main file in "GPhotos" v. 1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gphotos.php" instead of "photos.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,265 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13077522
PHP112168383
CSS1225360

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions20
▷ Named functions20100.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
11 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/simpleclose.png1.06KB0.18KB▼ 83.12%
images/ppsprite.png4.13KB2.26KB▼ 45.33%
images/simplenav.png2.82KB0.45KB▼ 84.18%
images/loader.png12.12KB6.30KB▼ 48.01%
images/ppprev.png0.81KB0.58KB▼ 27.90%