10% multiple-portfolios

Code Review | Multiple Portfolios

WordPress plugin Multiple Portfolios scored10%from 54 tests.

About plugin

  • Plugin page: multiple-portfolios
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2017
  • Latest release: Jan 4, 2019
  • Number of updates: 12
  • Update frequency: every 58.4 days
  • Top authors: nicoandrade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /10,630 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/multiple-portfolios/includes/class-multiple-portfolios-post-type.php+40
    Illegal string offset 'name'

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

An overview of server-side resources used by Multiple Portfolios
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2345.01 ▲0.06
Dashboard /wp-admin3.55 ▲0.2554.38 ▼3.75
Posts /wp-admin/edit.php3.67 ▲0.3155.40 ▲0.97
Add New Post /wp-admin/post-new.php6.29 ▲0.4094.46 ▲2.99
Media Library /wp-admin/upload.php3.48 ▲0.2644.50 ▲9.06
Create new Parent Portfolio /wp-admin/post-new.php?post_type=parent-portfolio3.5346.55
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio3.4842.38
Add New Item /wp-admin/post-new.php?post_type=portfolio6.2987.65
All Portfolio Items /wp-admin/edit.php?post_type=portfolio3.5345.47
All Parent Portfolios /wp-admin/edit.php?post_type=parent-portfolio3.6346.15
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio3.4838.86

Server storage [IO: ▲0.06MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Multiple Portfolios: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.28 ▲0.061.63 ▼0.2044.99 ▼1.40
Dashboard /wp-admin2,251 ▲765.50 ▼0.1084.75 ▼14.2539.17 ▼3.00
Posts /wp-admin/edit.php2,159 ▲622.00 ▲0.0435.51 ▼2.0136.94 ▲3.57
Add New Post /wp-admin/post-new.php1,575 ▲4722.97 ▼0.04668.39 ▲9.1177.43 ▲29.37
Media Library /wp-admin/upload.php1,462 ▲654.22 ▲0.0399.34 ▼4.5146.26 ▲0.05
Create new Parent Portfolio /wp-admin/post-new.php?post_type=parent-portfolio1,4672.4548.3150.23
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio1,3022.1227.7331.23
Add New Item /wp-admin/post-new.php?post_type=portfolio1,60417.05858.4731.23
All Portfolio Items /wp-admin/edit.php?post_type=portfolio1,1891.9133.0930.94
All Parent Portfolios /wp-admin/edit.php?post_type=parent-portfolio1,6681.9837.1332.95
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio1,3302.1226.8333.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Multiple_Portfolios_Gamajo_Taxonomy' not found in wp-content/plugins/multiple-portfolios/includes/class-multiple-portfolios-taxonomy-category.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Multiple_Portfolios_Gamajo_Taxonomy' not found in wp-content/plugins/multiple-portfolios/includes/class-multiple-portfolios-taxonomy-tag.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Multiple_Portfolios_Gamajo_Registerable' not found in wp-content/plugins/multiple-portfolios/includes/class-gamajo-post-type.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Multiple_Portfolios_Gamajo_Registerable' not found in wp-content/plugins/multiple-portfolios/includes/class-gamajo-taxonomy.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Multiple_Portfolios_Gamajo_Post_Type' not found in wp-content/plugins/multiple-portfolios/includes/class-multiple-portfolios-post-type.php:18

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 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: The official readme.txt might help

multiple-portfolios/multiple-portfolios.php Passed 13 tests

The primary PHP file in "Multiple Portfolios" version 1.0.4 is used by WordPress to initiate all plugin functionality
50 characters long description:
Create multiple portfolios on your WordPress site.

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
There were no executable files found in this plugin687 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12167709687

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes00.00%
Methods59
▷ Static methods11.69%
▷ Public methods4067.80%
▷ Protected methods1627.12%
▷ Private methods35.08%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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