78% portfolio-x

Code Review | Portfolio X

WordPress plugin Portfolio X scored78%from 54 tests.

About plugin

  • Plugin page: portfolio-x
  • Plugin version: 3.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Oct 23, 2023
  • Number of updates: 72
  • Update frequency: every 34.7 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /16,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▼1.03ms] Passed 4 tests

A check of server-side resources used by Portfolio X
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6444.40 ▲5.39
Dashboard /wp-admin4.15 ▲0.8550.32 ▼2.15
Posts /wp-admin/edit.php4.17 ▲0.8252.11 ▲3.90
Add New Post /wp-admin/post-new.php6.75 ▲0.8786.25 ▼11.27
Media Library /wp-admin/upload.php4.07 ▲0.8549.01 ▲14.08
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio-x4.5758.54
Portfolio X /wp-admin/edit.php?post_type=qcpx_portfolio4.1243.26
Portfolio Items /wp-admin/edit.php?post_type=portfolio-x4.1238.70
Settings /wp-admin/edit.php?post_type=qcpx_portfolio&page=qcpx-options-page4.0539.75
Support /wp-admin/edit.php?post_type=qcpx_portfolio&page=qcpro-promo-page-qcpx_portfolio-qcld-support4.0536.79

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 579 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_qcldlatestportfolio_widget
qx_ot_convrt
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Portfolio X
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,355 ▲59413.92 ▼0.4314.93 ▲13.1931.71 ▼9.75
Dashboard /wp-admin2,282 ▲1055.00 ▼0.5786.78 ▼1.9439.69 ▼0.40
Posts /wp-admin/edit.php2,199 ▲992.49 ▲0.5442.12 ▲7.3736.57 ▼0.64
Add New Post /wp-admin/post-new.php1,599 ▲7122.91 ▼0.17661.65 ▼9.4237.52 ▼17.12
Media Library /wp-admin/upload.php1,484 ▲844.52 ▲0.35115.98 ▲10.5349.54 ▲1.42
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio-x2,9959.66222.9584.97
Portfolio X /wp-admin/edit.php?post_type=qcpx_portfolio1,1542.4935.3328.90
Portfolio Items /wp-admin/edit.php?post_type=portfolio-x1,1992.3433.5227.07
Settings /wp-admin/edit.php?post_type=qcpx_portfolio&page=qcpx-options-page1,5922.3843.7462.39
Support /wp-admin/edit.php?post_type=qcpx_portfolio&page=qcpro-promo-page-qcpx_portfolio-qcld-support1,9461.9728.7286.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_qcldlatestportfolio_widget
    • qx_ot_convrt
    • widget_recent-posts
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-docs-page.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-option-types.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-settings-page.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions.php
    • > /wp-content/plugins/portfolio-x/portfolio-x.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-settings-api.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-deprecated.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-admin.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-meta-box-api.php
    • > /wp-content/plugins/portfolio-x/inc/option-tree/includes/ot-functions-compat.php
  • 70× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PORTFOLIO_THEME_URL - assumed 'PORTFOLIO_THEME_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/portfolio-x/themes/template-03/qcld-portfolio-template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function qcpx_get_option() in wp-content/plugins/portfolio-x/themes/template-03/qcld-portfolio-template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-x/qcld-admin-end-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/portfolio-x/themes/showcase/style-02/index.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/portfolio-x/inc/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/portfolio-x/qcld-register-shortcodes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-x/inc/cmb2/includes/helper-functions.php:120
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-x/inc/option-tree/assets/theme-mode/demo-theme-options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/portfolio-x/inc/cmb2/includes/CMB2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/portfolio-x/inc/cmb2/includes/types/CMB2_Type_Text_Time.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: portfolio grid, portfolio widget, portfolio, portfolio gallery, client showcase

portfolio-x/portfolio-x.php 92% from 13 tests

"Portfolio X" version 3.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin84,189 lines of code in 297 files:
LanguageFilesBlank linesComment linesLines of code
PO File12214,67319,16334,854
CSS431,8971,75021,190
PHP956,6138,96117,931
JavaScript211,4379695,325
SVG3003,735
Sass13238251,154

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity19.21
▷ Minimum class complexity1.00
▷ Maximum class complexity146.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes72
▷ Abstract classes811.11%
▷ Concrete classes6488.89%
▷ Final classes00.00%
Methods517
▷ Static methods6712.96%
▷ Public methods43984.91%
▷ Protected methods6813.15%
▷ Private methods101.93%
Functions266
▷ Named functions266100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants3485.00%
▷ Class constants615.00%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
93 PNG files occupy 1.73MB with 1.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-promo-page/images/light_bulb.png88.65KB27.35KB▼ 69.15%
inc/option-tree/assets/images/layout/left-dual-sidebar.png3.83KB2.06KB▼ 46.34%
qc-support-promo-page/images/step3.png92.04KB33.49KB▼ 63.62%
qc-support-promo-page/images/premium-theme-sld.png36.77KB13.88KB▼ 62.25%
themes/widgets/style-2/js/images/controls.png1.91KB0.60KB▼ 68.37%