84% portfolio-type

Code Review | Portfolio Post

WordPress plugin Portfolio Post scored84%from 54 tests.

About plugin

  • Plugin page: portfolio-type
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.0
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Dec 11, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: burakkaptan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.32ms] Passed 4 tests

A check of server-side resources used by Portfolio Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.67 ▼8.27
Dashboard /wp-admin3.34 ▲0.0350.60 ▼2.72
Posts /wp-admin/edit.php3.39 ▲0.0348.69 ▼0.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.44 ▼8.74
Media Library /wp-admin/upload.php3.26 ▲0.0337.16 ▼1.55
Portfolio /wp-admin/edit.php?post_type=portfolio3.3045.46
Add New /wp-admin/post-new.php?post_type=portfolio3.3853.54
Category /wp-admin/edit-tags.php?taxonomy=port_tax&post_type=portfolio3.2534.31

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Portfolio Post: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.31 ▼0.311.61 ▼0.2444.10 ▼2.78
Dashboard /wp-admin2,226 ▲555.61 ▼0.0388.03 ▼12.3639.55 ▼3.82
Posts /wp-admin/edit.php2,131 ▲281.97 ▼0.0335.70 ▼3.2636.76 ▲3.61
Add New Post /wp-admin/post-new.php1,552 ▲2623.31 ▲0.28671.87 ▼12.2157.45 ▼3.96
Media Library /wp-admin/upload.php1,431 ▲374.20 ▼0.0695.62 ▼31.3944.74 ▼1.33
Portfolio /wp-admin/edit.php?post_type=portfolio1,0981.9647.5732.93
Add New /wp-admin/post-new.php?post_type=portfolio2,3957.62179.5866.16
Category /wp-admin/edit-tags.php?taxonomy=port_tax&post_type=portfolio1,3052.1226.9930.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/portfolio-type/portfolio.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/portfolio-type/page-portfolio.php:3

User-side errors Passed 1 test

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

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
2 plugin tags: tags, portfolio

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

The main file in "Portfolio Post" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("portfolio-type.php" instead of "portfolio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28710106

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.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin