84% portfolio-mgmt

Code Review | Portfolio Mgmt.

WordPress plugin Portfolio Mgmt. scored84%from 54 tests.

About plugin

  • Plugin page: portfolio-mgmt
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Dec 20, 2018
  • Number of updates: 61
  • Update frequency: every 37.3 days
  • Top authors: wearepixel8 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /8,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▲2.02ms] Passed 4 tests

A check of server-side resources used by Portfolio Mgmt.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2648.11 ▲9.75
Dashboard /wp-admin3.56 ▲0.2252.63 ▼6.25
Posts /wp-admin/edit.php3.66 ▲0.3050.92 ▲5.49
Add New Post /wp-admin/post-new.php6.14 ▲0.2696.67 ▼0.91
Media Library /wp-admin/upload.php3.48 ▲0.2545.08 ▲10.76
All Portfolio Projects /wp-admin/edit.php?post_type=wap8-portfolio3.5144.56
Documentation /wp-admin/edit.php?post_type=wap8-portfolio&page=wap8-portfolio-documentation3.4539.92
Services /wp-admin/edit-tags.php?taxonomy=wap8-services&post_type=wap8-portfolio3.4840.54
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=wap8-portfolio-tags&post_type=wap8-portfolio3.4741.43
Add New /wp-admin/post-new.php?post_type=wap8-portfolio3.6257.97

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Portfolio Mgmt.
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.31 ▼1.065.71 ▲3.8845.10 ▲1.73
Dashboard /wp-admin2,247 ▲595.84 ▲0.98100.12 ▼8.5840.92 ▼1.69
Posts /wp-admin/edit.php2,130 ▲442.04 ▼0.0035.83 ▼3.0435.49 ▼0.95
Add New Post /wp-admin/post-new.php1,547 ▲2817.58 ▼5.49605.92 ▼75.1358.86 ▲0.77
Media Library /wp-admin/upload.php1,426 ▲414.23 ▲0.0395.94 ▼3.3942.47 ▼2.52
All Portfolio Projects /wp-admin/edit.php?post_type=wap8-portfolio1,1681.9331.3832.37
Documentation /wp-admin/edit.php?post_type=wap8-portfolio&page=wap8-portfolio-documentation8632.0425.8329.94
Services /wp-admin/edit-tags.php?taxonomy=wap8-services&post_type=wap8-portfolio1,3062.1325.6329.90
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=wap8-portfolio-tags&post_type=wap8-portfolio1,2752.2527.4828.02
Add New /wp-admin/post-new.php?post_type=wap8-portfolio2,7937.83173.7670.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-meta-boxes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/portfolio-mgmt/portfolio-mgmt.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-registrations.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-custom-columns.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-updated-messages.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-doc.php:262
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-mgmt/includes/portfolio-mgmt-help-tabs.php:133

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: portfolio, custom post type, post type, widget

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

"Portfolio Mgmt." version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Add the power of portfolio content management to your WordPress website with Portfolio Mgmt.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,436 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP104555861,018
PO File1133155390
CSS15628

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/star.png0.43KB0.71KB0.00%