84% ez-gallery

Code Review | EZ Gallery

WordPress plugin EZ Gallery scored 84% from 54 tests.

About plugin

  • Plugin page: ez-gallery
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2013
  • Latest release: Oct 8, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: donggua211 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,018 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.44ms] Passed 4 tests

Analyzing server-side resources used by EZ Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.80 ▲1.51
Dashboard /wp-admin3.39 ▲0.0848.23 ▼7.30
Posts /wp-admin/edit.php3.51 ▲0.1650.49 ▲3.12
Add New Post /wp-admin/post-new.php6.00 ▲0.1197.95 ▲4.43
Media Library /wp-admin/upload.php3.31 ▲0.0838.06 ▲5.32
Add EZ Gallery /wp-admin/post-new.php?post_type=ez_gallery3.4052.59
EZ Gallery /wp-admin/edit.php?post_type=ez_gallery3.3634.56
Categories /wp-admin/edit-tags.php?taxonomy=gallery_cat&post_type=ez_gallery3.3034.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
ez_gallery_page_id
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for EZ Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲19713.74 ▼0.635.22 ▲3.4638.51 ▼11.01
Dashboard /wp-admin2,252 ▲644.96 ▲0.0599.46 ▼16.6436.98 ▼17.39
Posts /wp-admin/edit.php2,137 ▲482.22 ▲0.2139.72 ▲3.4634.63 ▲0.04
Add New Post /wp-admin/post-new.php1,563 ▲2118.38 ▼4.89638.46 ▼66.7033.58 ▼17.40
Media Library /wp-admin/upload.php1,428 ▲404.36 ▲0.22106.31 ▼3.1140.41 ▼7.47
Add EZ Gallery /wp-admin/post-new.php?post_type=ez_gallery1,8213.6772.3432.15
EZ Gallery /wp-admin/edit.php?post_type=ez_gallery1,1072.0532.9528.00
Categories /wp-admin/edit-tags.php?taxonomy=gallery_cat&post_type=ez_gallery1,3052.2828.3227.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • ez_gallery_page_id
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× 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/ez-gallery/hook-functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ez-gallery/templates/archive-gallery.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

ez-gallery/ez-gallery.php Passed 13 tests

The main file in "EZ Gallery" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
16 characters long description:
An Easy gallery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,553 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32359947
PHP7110172363
CSS2315243

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/front/ad_next.png0.35KB0.26KB▼ 25.35%
assets/css/front/ad_scroll_back.png0.23KB0.17KB▼ 29.17%
assets/css/front/ad_scroll_forward.png0.23KB0.16KB▼ 28.63%
assets/css/front/ad_prev.png0.36KB0.26KB▼ 27.47%
assets/css/front/opa75.png0.11KB0.09KB▼ 13.64%