84% filterable-portfolio

Code Review | Filterable Portfolio

WordPress plugin Filterable Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: filterable-portfolio
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Nov 18, 2023
  • Number of updates: 59
  • Update frequency: every 54.7 days
  • Top authors: sayful (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /56,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Filterable Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4542.41 ▼0.05
Dashboard /wp-admin3.78 ▲0.4850.78 ▲3.49
Posts /wp-admin/edit.php3.84 ▲0.4965.04 ▲19.94
Add New Post /wp-admin/post-new.php6.47 ▲0.5998.42 ▲10.11
Media Library /wp-admin/upload.php3.62 ▲0.3937.62 ▲3.65
Add New /wp-admin/post-new.php?post_type=portfolio6.4790.41
Skills /wp-admin/edit-tags.php?taxonomy=portfolio_skill&post_type=portfolio3.6441.99
All Portfolios /wp-admin/edit.php?post_type=portfolio3.7641.36
Settings /wp-admin/edit.php?post_type=portfolio&page=fp-settings3.6240.29
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_cat&post_type=portfolio3.6437.49

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_widget_filterable_portfolio
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Filterable Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲25214.73 ▲0.225.01 ▲3.2546.28 ▲1.94
Dashboard /wp-admin2,395 ▲2156.50 ▲0.87118.36 ▲24.9743.34 ▼0.17
Posts /wp-admin/edit.php2,320 ▲2133.48 ▲1.4756.84 ▲0.2336.93 ▼11.73
Add New Post /wp-admin/post-new.php6,421 ▲4,89528.35 ▲5.08962.69 ▲379.2341.58 ▼5.14
Media Library /wp-admin/upload.php1,457 ▲544.31 ▲0.1087.01 ▼12.3643.52 ▼2.37
Add New /wp-admin/post-new.php?post_type=portfolio1,66516.89887.2935.19
Skills /wp-admin/edit-tags.php?taxonomy=portfolio_skill&post_type=portfolio1,4973.2949.2732.73
All Portfolios /wp-admin/edit.php?post_type=portfolio1,3463.4250.5130.96
Settings /wp-admin/edit.php?post_type=portfolio&page=fp-settings1,3933.9153.2434.35
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_cat&post_type=portfolio1,4943.2944.7530.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_widget_filterable_portfolio

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/filterable-portfolio/templates/shapla/archive-portfolio.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/filterable-portfolio/templates/archive-portfolio.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

filterable-portfolio/filterable-portfolio.php Passed 13 tests

Analyzing the main PHP file in "Filterable Portfolio" version 1.6.4
62 characters long description:
A WordPress plugin to display portfolio images with filtering.

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
No dangerous file extensions were detected2,714 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP255391,1562,708
JavaScript4014
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.73
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods140
▷ Static methods3424.29%
▷ Public methods13294.29%
▷ Protected methods00.00%
▷ Private methods85.71%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin