89% gbs-portfolio

Code Review | GBS Portfolio

WordPress plugin GBS Portfolio scored89%from 54 tests.

About plugin

  • Plugin page: gbs-portfolio
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Apr 1, 2021
  • Number of updates: 81
  • Update frequency: every 20.6 days
  • Top authors: gbsdeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,824 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.28ms] Passed 4 tests

This is a short check of server-side resources used by GBS Portfolio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.87 ▼2.10
Dashboard /wp-admin3.37 ▲0.0343.89 ▼11.09
Posts /wp-admin/edit.php3.43 ▲0.0743.39 ▼5.38
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.06 ▼18.53
Media Library /wp-admin/upload.php3.30 ▲0.0735.27 ▲2.80
Portfolio Setting /wp-admin/edit.php?post_type=gbs_portfolio&page=gbs_portfolio_setting3.2630.07
GBS Portfolio /wp-admin/edit.php?post_type=gbs_portfolio3.3435.48
Add Portfolio Item /wp-admin/post-new.php?post_type=gbs_portfolio3.4249.73
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=gbs_portfolio_categories&post_type=gbs_portfolio3.2934.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by GBS Portfolio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.62 ▼0.758.90 ▲7.1140.51 ▲2.35
Dashboard /wp-admin2,246 ▲544.87 ▼1.0295.26 ▼32.1637.17 ▼8.95
Posts /wp-admin/edit.php2,126 ▲372.05 ▲0.0535.67 ▼0.4131.18 ▼2.75
Add New Post /wp-admin/post-new.php1,564 ▲4523.16 ▲0.04678.81 ▲3.1869.66 ▲20.28
Media Library /wp-admin/upload.php1,419 ▲314.17 ▼0.0595.30 ▼25.6040.88 ▼6.20
Portfolio Setting /wp-admin/edit.php?post_type=gbs_portfolio&page=gbs_portfolio_setting8662.0624.7927.91
GBS Portfolio /wp-admin/edit.php?post_type=gbs_portfolio1,1121.9329.8330.94
Add Portfolio Item /wp-admin/post-new.php?post_type=gbs_portfolio2,3927.70170.7965.23
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=gbs_portfolio_categories&post_type=gbs_portfolio1,3022.1426.3227.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

gbs-portfolio/gbs-portfolio.php 92% from 13 tests

Analyzing the main PHP file in "GBS Portfolio" version 1.4
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 207 characters long)

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
There were no executable files found in this plugin453 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22313224
CSS132200
JavaScript25329

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/zoom.png0.78KB0.87KB0.00%