78% tc-portfolio

Code Review | Portfolio

WordPress plugin Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: tc-portfolio
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: May 19, 2019
  • Number of updates: 50
  • Update frequency: every 19.3 days
  • Top authors: themescode (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /21,106 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.22MB] [CPU: ▼2.71ms] Passed 4 tests

Analyzing server-side resources used by Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1944.92 ▲1.22
Dashboard /wp-admin3.60 ▲0.2557.50 ▼5.51
Posts /wp-admin/edit.php3.65 ▲0.2956.88 ▲10.05
Add New Post /wp-admin/post-new.php6.10 ▲0.2191.52 ▼9.56
Media Library /wp-admin/upload.php3.43 ▲0.2140.96 ▲3.03
All Portfolios /wp-admin/edit.php?post_type=tcportfolio3.5048.90
Portfolio Settings /wp-admin/edit.php?post_type=tcportfolio&page=tcportfolio-settings3.4339.70
Categories /wp-admin/edit-tags.php?taxonomy=tcportfolio_category&post_type=tcportfolio3.4638.98
Add New Portfolio /wp-admin/post-new.php?post_type=tcportfolio3.5661.29
Help & Upgrade /wp-admin/edit.php?post_type=tcportfolio&page=tcportfolio_menu_help3.4351.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Portfolio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,111 ▲36515.12 ▲0.9410.05 ▲8.1144.70 ▲2.07
Dashboard /wp-admin2,390 ▲2106.31 ▲0.70110.81 ▲21.3939.10 ▼0.01
Posts /wp-admin/edit.php2,320 ▲2203.72 ▲1.6748.40 ▲12.2129.73 ▼7.41
Add New Post /wp-admin/post-new.php1,581 ▲4623.18 ▼0.07653.39 ▼31.1136.52 ▼24.78
Media Library /wp-admin/upload.php1,458 ▲584.30 ▲0.1084.34 ▼26.5046.78 ▲0.08
All Portfolios /wp-admin/edit.php?post_type=tcportfolio1,3183.4351.4028.03
Portfolio Settings /wp-admin/edit.php?post_type=tcportfolio&page=tcportfolio-settings1,3543.4075.4436.88
Categories /wp-admin/edit-tags.php?taxonomy=tcportfolio_category&post_type=tcportfolio1,4953.4140.1527.03
Add New Portfolio /wp-admin/post-new.php?post_type=tcportfolio2,5657.90186.3576.07
Help & Upgrade /wp-admin/edit.php?post_type=tcportfolio&page=tcportfolio_menu_help1,65810.20288.2371.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • tc_portfolio_basics
    • tc_portfolio_style
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tc-portfolio/lib/tc-portfolio-help-upgrade.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tc-portfolio/template/single-tcportfolio.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tc-portfolio/lib/tc-portfolio-column.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tc-portfolio/tc-portfolio.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-portfolio/lib/tc-metabox.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-portfolio/lib/tc-portfolio-cpt.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tc-portfolio/template/single-tcportfolio-center.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-portfolio/public/tc-view.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
You can look at the official readme.txt

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

The entry point to "Portfolio" version 1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 262 characters long)

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
Good job! No executable or dangerous file extensions detected3,786 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43801741,368
CSS466241,308
PHP132883001,110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.33
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin