78% fancy-grid-portfolio

Code Review | Fancy Grid Portfolio

WordPress plugin Fancy Grid Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: fancy-grid-portfolio
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Oct 21, 2018
  • Number of updates: 15
  • Update frequency: every 51.7 days
  • Top authors: laith3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,195 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.55MB] [CPU: ▼4.59ms] Passed 4 tests

Server-side resources used by Fancy Grid Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5438.86 ▼4.08
Dashboard /wp-admin3.86 ▲0.5545.43 ▼4.94
Posts /wp-admin/edit.php3.90 ▲0.5546.24 ▲1.17
Add New Post /wp-admin/post-new.php6.51 ▲0.6285.99 ▼10.52
Media Library /wp-admin/upload.php3.79 ▲0.5636.99 ▲4.52
Dashboard /wp-admin/admin.php?page=fancy-grid-portfolio3.7032.44
Portfolio Items /wp-admin/edit.php?post_type=portfolio_item3.8237.38
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_categories3.7834.58
Drag Drop Sort /wp-admin/admin.php?page=custom-order3.7531.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Fancy Grid Portfolio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,063 ▲32813.61 ▼1.0514.23 ▲12.2448.30 ▲2.65
Dashboard /wp-admin2,240 ▲495.77 ▲0.9294.10 ▼11.9240.21 ▼4.38
Posts /wp-admin/edit.php2,133 ▲442.11 ▲0.1235.03 ▼2.1532.36 ▼2.60
Add New Post /wp-admin/post-new.php6,711 ▲5,19225.00 ▲1.92991.92 ▲373.4640.25 ▼16.57
Media Library /wp-admin/upload.php1,428 ▲404.21 ▼0.0494.10 ▼3.3143.59 ▲0.07
Dashboard /wp-admin/admin.php?page=fancy-grid-portfolio9371.8025.7630.71
Portfolio Items /wp-admin/edit.php?post_type=portfolio_item1,0882.0735.1327.48
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_categories1,2782.2828.5328.82
Drag Drop Sort /wp-admin/admin.php?page=custom-order8301.8126.3825.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/fancy-grid-portfolio/public/partials/fancy-grid-portfolio-public-display.php
    • > /wp-content/plugins/fancy-grid-portfolio/admin/partials/fancy-grid-portfolio-admin-display.php
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/text.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/user.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/controllers/field_group.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/controllers/third_party.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/file.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/true_false.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/color_picker.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/controllers/addons.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/fields/post_object.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fancy-grid-portfolio/lib/advanced-custom-fields/core/views/meta_box_fields.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === fancy-grid-portfolio === )
Please take inspiration from this readme.txt

fancy-grid-portfolio/fancy-grid-portfolio.php Passed 13 tests

The main PHP script in "Fancy Grid Portfolio" version 2.0.2 is automatically included on every request by WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected40,189 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PO File239,29713,65320,306
PHP564,1715,1869,002
JavaScript224,1823,0727,469
CSS129193923,412

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.82
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods318
▷ Static methods20.63%
▷ Public methods31398.43%
▷ Protected methods00.00%
▷ Private methods51.57%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
36 compressed PNG files occupy 0.24MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
lib/advanced-custom-fields/images/arrows.png0.24KB0.24KB0.00%
lib/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%