71% ew-gallery

Code Review | EW Gallery Plugin

WordPress plugin EW Gallery Plugin scored71%from 54 tests.

About plugin

  • Plugin page: ew-gallery
  • Plugin version: 1.0 Beta...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.0.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: Jan 9, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: kpaske (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /990 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲1.17ms] Passed 4 tests

A check of server-side resources used by EW Gallery Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.22 ▲0.12
Dashboard /wp-admin3.56 ▲0.2554.75 ▲10.12
Posts /wp-admin/edit.php3.67 ▲0.3151.02 ▲4.78
Add New Post /wp-admin/post-new.php6.13 ▲0.2597.83 ▲0.54
Media Library /wp-admin/upload.php3.45 ▲0.2236.20 ▼0.78
EW Gallery Settings /wp-admin/edit.php?post_type=ew_gallery&page=ew_gallery_settings3.4232.65
New EW Gallery /wp-admin/post-new.php?post_type=ew_gallery3.5551.36
EW Galleries /wp-admin/edit.php?post_type=ew_gallery3.5240.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EW Gallery Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,113 ▲35615.73 ▲1.335.84 ▲3.8042.18 ▼8.80
Dashboard /wp-admin2,412 ▲2246.80 ▲1.91125.69 ▲18.1137.97 ▼7.31
Posts /wp-admin/edit.php2,325 ▲2363.36 ▲1.3551.13 ▲10.6131.79 ▼6.72
Add New Post /wp-admin/post-new.php1,730 ▲19722.44 ▼0.64601.85 ▼47.8530.29 ▼26.19
Media Library /wp-admin/upload.php1,461 ▲764.59 ▲0.3983.78 ▼37.7341.81 ▼5.61
EW Gallery Settings /wp-admin/edit.php?post_type=ew_gallery&page=ew_gallery_settings2,5294.2286.6833.60
New EW Gallery /wp-admin/post-new.php?post_type=ew_gallery1,7324.1867.1233.00
EW Galleries /wp-admin/edit.php?post_type=ew_gallery1,2903.6347.1425.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ew_gallery&page=ew_gallery_settings
    • > Notice in wp-content/plugins/ew-gallery/ew_gallery.php+485
    Undefined index: name
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ew_gallery&page=ew_gallery_settings
    • > Notice in wp-content/plugins/ew-gallery/ew_gallery.php+452
    Undefined index: default

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ew-gallery/ew_shortcodes.php:685
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ew-gallery/ew_shortcodes.php:685

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ew_gallery
    • > Network (severe)
    wp-content/plugins/ew-gallery/script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to ew_gallery_screenshot1.png.), #2 (This screen shot description corresponds to ew_gallery_screenshot2.png.)
  • Plugin Name: You should set the name of your plugin on the first line ( === ew-gallery === )
You can take inspiration from this readme.txt

ew-gallery/ew_gallery.php 77% from 13 tests

Analyzing the main PHP file in "EW Gallery Plugin" version 1.0 Beta...
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 419 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("ew-gallery.php" instead of "ew_gallery.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1.0 Beta...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected6,572 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,4808255,087
PHP35151751,410
CSS28075

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions32
▷ Named functions32100.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
46 PNG files occupy 0.46MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/b13.png0.82KB0.93KB0.00%
img/b17.png0.78KB0.82KB0.00%
img/a17.png5.38KB3.32KB▼ 38.24%
img/a03.png5.54KB3.44KB▼ 37.80%
img/a18.png3.21KB1.88KB▼ 41.38%