79% bportfolio

Code Review | B Portfolio

WordPress plugin B Portfolio scored79%from 54 tests.

About plugin

  • Plugin page: bportfolio
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2021
  • Latest release: Oct 14, 2023
  • Number of updates: 23
  • Update frequency: every 31.4 days
  • Top authors: shehabulislam (43.48%)srabonr (34.78%)abuhayat (30.43%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 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.81MB] [CPU: ▲6.07ms] Passed 4 tests

A check of server-side resources used by B Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.39 ▲0.9254.04 ▲9.02
Dashboard /wp-admin4.11 ▲0.8170.47 ▲15.63
Posts /wp-admin/edit.php4.16 ▲0.8076.94 ▲20.30
Add New Post /wp-admin/post-new.php6.72 ▲0.84104.10 ▼7.54
Media Library /wp-admin/upload.php4.03 ▲0.8047.12 ▲7.15
Shortcodes /wp-admin/edit.php?post_type=shortcode-generator4.2254.44
All Portfolios /wp-admin/edit.php?post_type=bportfolio4.2255.12
Category /wp-admin/edit-tags.php?taxonomy=bportfolio_cat&post_type=bportfolio4.0251.39
Settings /wp-admin/edit.php?post_type=bportfolio&page=portfolio-settings4.1547.84
Add New /wp-admin/post-new.php?post_type=bportfolio4.2562.18
Help /wp-admin/edit.php?post_type=bportfolio&page=bppf-support4.1446.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 189 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
_bppfsettings_
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for B Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲23113.67 ▼0.7214.17 ▲12.0440.66 ▼3.15
Dashboard /wp-admin2,256 ▲765.60 ▼0.05111.09 ▲22.1044.11 ▲1.30
Posts /wp-admin/edit.php2,153 ▲502.05 ▲0.0339.65 ▼0.6936.05 ▼4.28
Add New Post /wp-admin/post-new.php1,576 ▲5023.58 ▲0.51694.48 ▲13.7459.03 ▲1.98
Media Library /wp-admin/upload.php1,464 ▲674.17 ▼0.0594.91 ▼12.4043.49 ▼6.06
Shortcodes /wp-admin/edit.php?post_type=shortcode-generator1,3343.5353.9230.19
All Portfolios /wp-admin/edit.php?post_type=bportfolio1,3463.5455.9628.15
Category /wp-admin/edit-tags.php?taxonomy=bportfolio_cat&post_type=bportfolio1,3352.1330.1231.35
Settings /wp-admin/edit.php?post_type=bportfolio&page=portfolio-settings1,6334.5379.4534.40
Add New /wp-admin/post-new.php?post_type=bportfolio1,9674.5581.5050.67
Help /wp-admin/edit.php?post_type=bportfolio&page=bppf-support1,70010.53298.87115.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • _bppfsettings_
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=bportfolio
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/bportfolio/inc/bportfolio-shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bportfolio/single-bportfolio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bportfolio/admin/ads/submenu.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/bportfolio/inc/bportfolio-settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: showcase, block, portfolio, widget, projects

bportfolio/bportfolio.php Passed 13 tests

Analyzing the main PHP file in "B Portfolio" version 1.0.1
41 characters long description:
Easily display interactive showcase item.

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
No dangerous file extensions were detected44,532 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
CSS143,15354215,032
PHP792,4109847,692
PO File203,1973,5946,490
JavaScript101,7331,2695,965
Sass1595234,803
SVG7004,550

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity24.26
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity6.79
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods233
▷ Static methods4017.17%
▷ Public methods233100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%