78% wb-portfolio

Code Review | WB Portfolio

WordPress plugin WB Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: wb-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Aug 20, 2016
  • Latest release: Aug 20, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: wpbrim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.39ms] Passed 4 tests

This is a short check of server-side resources used by WB Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.19 ▼3.42
Dashboard /wp-admin3.37 ▲0.0754.52 ▼0.25
Posts /wp-admin/edit.php3.42 ▲0.0754.96 ▲1.75
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.97 ▲5.40
Media Library /wp-admin/upload.php3.29 ▲0.0736.14 ▲0.35
Categories /wp-admin/edit-tags.php?taxonomy=wbportfolio_category&post_type=wbportfolio3.2938.40
Help & Upgrade /wp-admin/edit.php?post_type=wbportfolio&page=wbportfolio_menu_help3.2633.40
All Portfolios /wp-admin/edit.php?post_type=wbportfolio3.3437.58
Add New Portfolio /wp-admin/post-new.php?post_type=wbportfolio3.4453.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WB Portfolio: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21513.73 ▼0.649.47 ▲7.5241.68 ▼0.71
Dashboard /wp-admin2,243 ▲664.85 ▼0.04101.03 ▼22.3442.02 ▲3.88
Posts /wp-admin/edit.php2,129 ▲371.99 ▼0.0440.26 ▲2.1135.69 ▲3.77
Add New Post /wp-admin/post-new.php1,559 ▲2623.18 ▼0.17685.46 ▼37.5460.75 ▲0.71
Media Library /wp-admin/upload.php1,422 ▲374.24 ▲0.09101.20 ▼14.1445.99 ▼1.77
Categories /wp-admin/edit-tags.php?taxonomy=wbportfolio_category&post_type=wbportfolio1,3022.1427.8128.41
Help & Upgrade /wp-admin/edit.php?post_type=wbportfolio&page=wbportfolio_menu_help7952.1823.7726.46
All Portfolios /wp-admin/edit.php?post_type=wbportfolio1,0992.0131.4528.40
Add New Portfolio /wp-admin/post-new.php?post_type=wbportfolio2,3777.62173.8869.02

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wb-portfolio/lib/wb-portfolio-help-upgrade.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wb-portfolio/lib/wb-metabox.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wb-portfolio/lib/wb-portfolio-cpt.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wb-portfolio/wb-portfolio.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wb-portfolio/public/wb-view.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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 require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The primary PHP file in "WB Portfolio" version 1.0 is used by WordPress to initiate all plugin functionality
89 characters long description:
WB Portfolio is a custom post type based Responsive Filterable Portfolio showing plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin332 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP62436190
CSS21410120
JavaScript231122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin