89% portfolio-gallery-master

Code Review | Portfolio Gallery Master

WordPress plugin Portfolio Gallery Master scored89%from 54 tests.

About plugin

  • Plugin page: portfolio-gallery...
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 26, 2015
  • Latest release: Oct 17, 2018
  • Number of updates: 16
  • Update frequency: every 69.8 days
  • Top authors: devcon1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /8,297 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▲6.87ms] Passed 4 tests

Server-side resources used by Portfolio Gallery Master
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0950.09 ▲13.87
Dashboard /wp-admin3.42 ▲0.1260.61 ▲8.87
Posts /wp-admin/edit.php3.52 ▲0.1754.08 ▲11.16
Add New Post /wp-admin/post-new.php6.02 ▲0.1485.55 ▲0.11
Media Library /wp-admin/upload.php3.35 ▲0.1240.70 ▲7.32
Styles /wp-admin/admin.php?page=pgm_styles_menu3.3437.63
Settings /wp-admin/admin.php?page=pgm_settings_menu3.3437.48
All Portfolios /wp-admin/edit.php?post_type=pgm-portfolio3.3735.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 14 new options
New WordPress options
pgm_portfolio_initial_height
pgm_portfolio_initial_width
widget_theysaidso_widget
widget_recent-comments
pgm_portfolio_padding
pgm_portfolio_margin
pgm_display_max_width
widget_recent-posts
pgm_display_min_width
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Portfolio Gallery Master
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲21213.71 ▼0.647.80 ▲5.9342.81 ▼0.40
Dashboard /wp-admin2,254 ▲695.88 ▲0.03105.06 ▲4.7782.97 ▲38.51
Posts /wp-admin/edit.php2,148 ▲592.08 ▲0.0738.83 ▲2.4533.38 ▲1.29
Add New Post /wp-admin/post-new.php1,722 ▲18922.43 ▼0.85737.14 ▲51.4935.80 ▼22.95
Media Library /wp-admin/upload.php1,442 ▲544.31 ▲0.0796.03 ▼1.9671.91 ▲26.32
Styles /wp-admin/admin.php?page=pgm_styles_menu1,0832.3835.1530.10
Settings /wp-admin/admin.php?page=pgm_settings_menu1,0262.1228.5138.65
All Portfolios /wp-admin/edit.php?post_type=pgm-portfolio1,1122.0133.1829.91

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

portfolio-gallery-master/portfolio-gallery-master.php 92% from 13 tests

The entry point to "Portfolio Gallery Master" version 1.6.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 818 characters long)

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
There were no executable files found in this plugin1,466 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP15126517777
CSS3379381
JavaScript59450308

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.71
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods4890.57%
▷ Protected methods00.00%
▷ Private methods59.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.97MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/admin-icon.png2.72KB1.71KB▼ 37.11%
screenshot-3.png103.13KB36.91KB▼ 64.21%
screenshot-2.png102.01KB37.72KB▼ 63.02%
screenshot-4.png73.35KB23.26KB▼ 68.29%
screenshot-1.png715.12KB222.65KB▼ 68.86%