79% portfolio-filter-gallery

Code Review | Portfolio Gallery - Image Gallery Plugin

WordPress plugin Portfolio Gallery - Image Gallery Plugin scored79%from 54 tests.

About plugin

  • Plugin page: portfolio-filter-...
  • Plugin version: 1.5.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 10, 2016
  • Latest release: Nov 8, 2023
  • Number of updates: 357
  • Update frequency: every 7.3 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

293 reviews

Install metrics

30,000+ active /708,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.30ms] Passed 4 tests

This is a short check of server-side resources used by Portfolio Gallery - Image Gallery Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1548.83 ▲6.85
Dashboard /wp-admin3.47 ▲0.1246.28 ▼15.18
Posts /wp-admin/edit.php3.58 ▲0.2251.17 ▲4.20
Add New Post /wp-admin/post-new.php6.07 ▲0.1890.55 ▼6.82
Media Library /wp-admin/upload.php3.39 ▲0.1635.81 ▲0.59
Add New Gallery /wp-admin/post-new.php?post_type=awl_filter_gallery3.8449.13
Filters /wp-admin/edit.php?post_type=awl_filter_gallery&page=pfg-filter-page3.4332.71
Docs /wp-admin/edit.php?post_type=awl_filter_gallery&page=sr-doc-page3.3628.78
All Gallery /wp-admin/edit.php?post_type=awl_filter_gallery3.4041.67

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, 7 new options
New WordPress options
awl_portfolio_filter_gallery_categories
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Portfolio Gallery - Image Gallery Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14613.81 ▼0.908.05 ▲6.3538.07 ▼7.15
Dashboard /wp-admin2,244 ▲705.53 ▼0.1186.02 ▼6.0880.82 ▲37.34
Posts /wp-admin/edit.php2,146 ▲461.99 ▲0.0440.42 ▲1.8735.27 ▲0.61
Add New Post /wp-admin/post-new.php1,576 ▲4725.09 ▲1.90766.37 ▲157.6340.82 ▼13.07
Media Library /wp-admin/upload.php1,446 ▲494.16 ▼0.04101.01 ▲4.4062.94 ▲16.11
Add New Gallery /wp-admin/post-new.php?post_type=awl_filter_gallery3,6244.88108.27128.41
Filters /wp-admin/edit.php?post_type=awl_filter_gallery&page=pfg-filter-page1,0821.6628.9932.09
Docs /wp-admin/edit.php?post_type=awl_filter_gallery&page=sr-doc-page1,4729.73262.3577.84
All Gallery /wp-admin/edit.php?post_type=awl_filter_gallery1,1241.9032.0130.46

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • awl_portfolio_filter_gallery_categories
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=awl_filter_gallery
    • > Notice in wp-content/plugins/portfolio-filter-gallery/portfolio-filter-gallery.php+146
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=awl_filter_gallery
    • > Notice in wp-content/plugins/portfolio-filter-gallery/portfolio-filter-gallery.php+146
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/portfolio-filter-gallery/update-old-settings.php
    • > /wp-content/plugins/portfolio-filter-gallery/docs.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: portfolio, gallery, wordpress portfolio plugin, responsive, portfolio gallery

portfolio-filter-gallery/portfolio-filter-gallery.php Passed 13 tests

This is the main PHP file of "Portfolio Gallery - Image Gallery Plugin" version 1.5.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Portfolio Filter Gallery For WordPress.

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
Good job! No executable or dangerous file extensions detected31,167 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS132,91199121,458
JavaScript101,1806195,419
PHP72251512,256
PO File25068231,061
SVG200973

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 complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2191.30%
▷ Protected methods28.70%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close.png0.32KB0.23KB▼ 28.22%
lightbox/ld-lightbox/images/close.png0.27KB0.29KB0.00%
lightbox/ld-lightbox/images/next.png1.32KB1.58KB0.00%
img/close-icon-white.png0.99KB0.61KB▼ 38.80%
img/video-play-button-icon.png1.47KB0.39KB▼ 73.42%