10% is-photo-gallery

Code Review | IS Photo Gallery

WordPress plugin IS Photo Gallery scored10%from 54 tests.

About plugin

  • Plugin page: is-photo-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Mar 27, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Irena0575 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,594 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/is-photo-gallery/wp-isphoto.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ISGallery has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼50.87ms] Passed 4 tests

A check of server-side resources used by IS Photo Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.205.50 ▼32.20
Dashboard /wp-admin2.29 ▼1.025.94 ▼41.81
Posts /wp-admin/edit.php2.29 ▼1.076.95 ▼42.69
Add New Post /wp-admin/post-new.php2.29 ▼3.605.98 ▼86.78
Media Library /wp-admin/upload.php2.29 ▼0.946.00 ▼26.61
WP-IS Photo Gallery /wp-admin/options-general.php?page=wpIS3DPhoto2.296.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for IS Photo Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12113.42 ▼1.188.48 ▲6.8543.68 ▲4.97
Dashboard /wp-admin2,204 ▲295.57 ▼0.0894.63 ▼6.7141.73 ▼2.49
Posts /wp-admin/edit.php2,103 ▲62.02 ▲0.0434.24 ▼1.8635.74 ▼1.45
Add New Post /wp-admin/post-new.php1,533 ▲722.88 ▼0.32623.88 ▼41.0650.83 ▼1.57
Media Library /wp-admin/upload.php1,409 ▲94.17 ▼0.0297.01 ▲4.0244.87 ▲1.94
WP-IS Photo Gallery /wp-admin/options-general.php?page=wpIS3DPhoto1,0632.1422.7929.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/is-photo-gallery/wp-isphoto.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ISGallery has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpIS3DPhoto
    • > Deprecated in wp-content/plugins/is-photo-gallery/wp-isphoto.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ISGallery has a deprecated constructor

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/is-photo-gallery/wp-isphoto.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/is-photo-gallery/uninstall.php:3

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wpIS3DPhoto
    • > Network (severe)
    wp-content/plugins/is-photo-gallery/js/is3d_utility.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (IS Photo Gallery, captions enabled), #2 (IS Photo Gallery, captions disabled), #3 (Choose the options you need), #4 (Lightbox popups)
The official readme.txt is a good inspiration

is-photo-gallery/wp-isphoto.php 92% from 13 tests

The main file in "IS Photo Gallery" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("is-photo-gallery.php" instead of "wp-isphoto.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
There were no executable files found in this plugin1,595 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1337137864
PHP2151172584
CSS12010147

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity76.00
▷ Minimum class complexity76.00
▷ Maximum class complexity76.00
Average method complexity6.77
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.83MB with 0.52MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png480.94KB178.17KB▼ 62.96%
screenshot-1.png181.95KB64.08KB▼ 64.78%
screenshot-3.png39.86KB17.04KB▼ 57.24%
screenshot-2.png151.76KB54.54KB▼ 64.06%