83% easy-video-and-image-gallery

Code Review | Easy Video and Image Gallery

WordPress plugin Easy Video and Image Gallery scored83%from 54 tests.

About plugin

  • Plugin page: easy-video-and-im...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Jun 1, 2016
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: soliles (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,933 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.55MB] [CPU: ▼16.06ms] Passed 4 tests

This is a short check of server-side resources used by Easy Video and Image Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1643.67 ▲6.49
Dashboard /wp-admin3.45 ▲0.1149.08 ▼11.67
Posts /wp-admin/edit.php3.57 ▲0.2254.53 ▲8.30
Add New Post /wp-admin/post-new.php3.28 ▼2.6035.43 ▼64.06
Media Library /wp-admin/upload.php3.36 ▲0.1340.42 ▲5.02
Add New /wp-admin/post-new.php?post_type=evigallery3.2732.78
Settings /wp-admin/edit.php?post_type=evigallery&page=evigallery_settings3.3637.10
Galleries /wp-admin/edit.php?post_type=evigallery3.4339.01
Albums of galleries /wp-admin/edit-tags.php?taxonomy=evigallery_album&post_type=evigallery3.3840.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Video and Image Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,193 ▲44715.23 ▲0.856.99 ▲5.3140.72 ▼0.64
Dashboard /wp-admin2,411 ▲2206.48 ▲0.64130.19 ▲28.6340.37 ▼1.54
Posts /wp-admin/edit.php2,317 ▲2253.41 ▲1.4348.40 ▲13.6231.81 ▼3.07
Add New Post /wp-admin/post-new.php1,730 ▲19722.65 ▼0.69621.24 ▼54.9731.69 ▼25.29
Media Library /wp-admin/upload.php1,453 ▲654.28 ▲0.0279.49 ▼29.6543.36 ▼6.26
Add New /wp-admin/post-new.php?post_type=evigallery1,7963.6365.0690.49
Settings /wp-admin/edit.php?post_type=evigallery&page=evigallery_settings1,0563.1838.2926.27
Galleries /wp-admin/edit.php?post_type=evigallery1,2783.4544.4426.30
Albums of galleries /wp-admin/edit-tags.php?taxonomy=evigallery_album&post_type=evigallery1,4903.1243.2127.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=evigallery
    • > Notice in wp-content/plugins/easy-video-and-image-gallery/includes/meta_box.php+122
    Undefined index: evigallery-items-ids
    • > GET request to /wp-admin/post-new.php?post_type=evigallery
    • > Warning in wp-content/plugins/easy-video-and-image-gallery/includes/meta_box.php+124
    count(): Parameter must be an array or an object that implements Countable

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: responsive, easy, video, media, album...

easy-video-and-image-gallery/easy-video-and-image-gallery.php 77% from 13 tests

This is the main PHP file of "Easy Video and Image Gallery" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,125 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP98018583
JavaScript3215253
CSS250180
PO File168152109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/controls.png4.61KB2.23KB▼ 51.70%