84% grider-portfolio

Code Review | Grider Portfolio

WordPress plugin Grider Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: grider-portfolio
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2015
  • Latest release: Jul 17, 2023
  • Number of updates: 51
  • Update frequency: every 57.3 days
  • Top authors: ullakalim8 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,998 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.05ms] Passed 4 tests

Server-side resources used by Grider Portfolio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.93 ▼3.85
Dashboard /wp-admin3.32 ▲0.0243.52 ▼6.55
Posts /wp-admin/edit.php3.38 ▲0.0245.73 ▼3.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.42 ▼10.63
Media Library /wp-admin/upload.php3.25 ▲0.0236.78 ▲2.79
Add New /wp-admin/post-new.php?post_type=gd_post_types3.3747.74
All GridPortfolio /wp-admin/edit.php?post_type=gd_post_types3.2936.35

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Grider Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲18713.79 ▼0.8110.01 ▲8.0755.39 ▲3.89
Dashboard /wp-admin2,227 ▲424.83 ▼0.98105.66 ▲5.1938.16 ▼3.54
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0236.23 ▼4.6832.43 ▼4.57
Add New Post /wp-admin/post-new.php1,537 ▲1617.61 ▼5.66689.57 ▲28.7853.55 ▼7.70
Media Library /wp-admin/upload.php1,415 ▲304.22 ▲0.0295.16 ▼7.6341.98 ▼0.84
Add New /wp-admin/post-new.php?post_type=gd_post_types2,1757.59171.8066.17
All GridPortfolio /wp-admin/edit.php?post_type=gd_post_types1,0891.9830.7729.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/grider-portfolio/gd-pf-shortcode.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Displays a thumbnail grid view), #2 (Grid expanding preview), #3 (Next previous and close button on expanding image)
You can take inspiration from this readme.txt

grider-portfolio/grid-portfolio.php 92% from 13 tests

This is the main PHP file of "Grider Portfolio" version 1.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("grider-portfolio.php" instead of "grid-portfolio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected304 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43844161
CSS32564
PHP5562762
SVG10017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png28.23KB12.29KB▼ 56.46%
assets/icon-128x128.png6.47KB1.13KB▼ 82.56%
screenshot-2.png118.04KB49.72KB▼ 57.88%
screenshot-1.png118.04KB49.72KB▼ 57.88%