78% image-video-gallery-with-categories

Code Review | Image & Video Gallery with categories

WordPress plugin Image & Video Gallery with categories scored 78% from 54 tests.

About plugin

  • Plugin page: image-video-galle...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2020
  • Latest release: Jan 21, 2020
  • Number of updates: 31
  • Update frequency: every 0.4 days
  • Top authors: neoiits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▲1.49ms] Passed 4 tests

Server-side resources used by Image & Video Gallery with categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3044.05 ▲3.34
Dashboard /wp-admin3.81 ▲0.5048.12 ▼2.10
Posts /wp-admin/edit.php3.82 ▲0.4757.89 ▲13.41
Add New Post /wp-admin/post-new.php6.38 ▲0.4989.21 ▼1.18
Media Library /wp-admin/upload.php3.60 ▲0.3840.35 ▲5.88
Category /wp-admin/admin.php?page=category_class3.6341.48
Edit Image /wp-admin/admin.php?page=edit_image_class3.5336.94
Add Image /wp-admin/admin.php?page=add_image_class3.5334.78
Add Category /wp-admin/admin.php?page=add_category_class3.6135.75
New Gallery /wp-admin/admin.php?page=add_new_class3.6139.59
Delete Image /wp-admin/admin.php?page=delete_image_class3.5336.37
Gallery List /wp-admin/admin.php?page=gallery_table_class3.6338.37
Help /wp-admin/admin.php?page=help_class3.6137.47
Add Video /wp-admin/admin.php?page=add_video_class3.5335.94

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,553 new files
Database: 4 new tables, 6 new options
New tables
wp_neo_ivg_category
wp_neo_ivg_gallery
wp_neo_ivg_gallery_images
wp_neo_ivg_image_category
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Image & Video Gallery with categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,091 ▲35615.34 ▲0.9812.81 ▲10.7845.23 ▼2.53
Dashboard /wp-admin2,362 ▲1746.54 ▲1.64118.11 ▲2.61100.07 ▲48.65
Posts /wp-admin/edit.php2,286 ▲1973.42 ▲1.3852.42 ▲16.0677.11 ▲42.10
Add New Post /wp-admin/post-new.php1,575 ▲4024.01 ▲0.86574.30 ▼140.8930.86 ▼26.16
Media Library /wp-admin/upload.php1,419 ▲314.21 ▲0.0180.01 ▼24.1874.66 ▲31.22
Category /wp-admin/admin.php?page=category_class1,1973.1042.3367.59
Edit Image /wp-admin/admin.php?page=edit_image_class1,0263.0539.3744.60
Add Image /wp-admin/admin.php?page=add_image_class1,1363.1340.3548.98
Add Category /wp-admin/admin.php?page=add_category_class1,0813.1638.8160.25
New Gallery /wp-admin/admin.php?page=add_new_class1,0813.0842.0949.16
Delete Image /wp-admin/admin.php?page=delete_image_class1,1363.1039.1257.09
Gallery List /wp-admin/admin.php?page=gallery_table_class1,2243.0639.2666.58
Help /wp-admin/admin.php?page=help_class1,0873.0940.6164.56
Add Video /wp-admin/admin.php?page=add_video_class1,1563.1740.5867.80

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add_video_class
    • > Notice in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php+291
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=edit_image_class
    • > Notice in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php+351
    Undefined index: gallery_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=delete_image_class
    • > Notice in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php+343
    Array to string conversion

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
Please fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-video-gallery-with-categories/template/function.php:106
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-video-gallery-with-categories/image-video-gallery-with-categories.php:28
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery-category.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-video-gallery-with-categories/template/neo-image-video-gallery-shortcode.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery-category.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/image-video-gallery-with-categories/class-neo-image-video-gallery.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: video gallery with categories, video gallery, image and video gallery with categories, gallery with categories, image gallery...

image-video-gallery-with-categories/image-video-gallery-with-categories.php 92% from 13 tests

This is the main PHP file of "Image & Video Gallery with categories" version 1.0.2, 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:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)

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 detected107,780 lines of code in 1,523 files:
LanguageFilesBlank linesComment linesLines of code
JSON40045,201
YAML40017,714
JavaScript263,4041,43914,363
SVG1,41505,61611,335
CSS233,5671018,920
Sass18505344,372
LESS18502554,331
PHP71522251,383
Markdown441089
XML40072

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity39.33
▷ Minimum class complexity2.00
▷ Maximum class complexity76.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods54
▷ Static methods611.11%
▷ Public methods5398.15%
▷ Protected methods00.00%
▷ Private methods11.85%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants5
▷ Global constants5100.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
9 PNG files occupy 4.88MB with 2.77MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png278.50KB73.92KB▼ 73.46%
screenshot-1.png1,666.99KB426.98KB▼ 74.39%
screenshot-2.png973.94KB257.52KB▼ 73.56%
img/galleryIcon.png1.21KB1.58KB0.00%
screenshot-4.png721.09KB266.52KB▼ 63.04%