74% professional-portfolio

Code Review | Professional Portfolio

WordPress plugin Professional Portfolio scored74%from 54 tests.

About plugin

  • Plugin page: professional-port...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.2
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: Oct 3, 2019
  • Number of updates: 17
  • Update frequency: every 8.4 days
  • Top authors: ittanta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.45ms] Passed 4 tests

A check of server-side resources used by Professional Portfolio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.64 ▲1.96
Dashboard /wp-admin3.36 ▲0.0148.50 ▼15.84
Posts /wp-admin/edit.php3.41 ▲0.0652.75 ▼1.00
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.13 ▼10.33
Media Library /wp-admin/upload.php3.28 ▲0.0537.85 ▼2.62
Add New /wp-admin/post-new.php?post_type=prof-portfolio3.4462.68
Professional Portfolio /wp-admin/edit.php?post_type=prof-portfolio3.3340.92
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_entries&post_type=prof-portfolio3.2836.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 225 new files
Database: no new tables, 24 new options
New WordPress options
portfolio_detail_image_position
widget_theysaidso_widget
title_font_size
number_of_item_per_page
db_upgraded
portfolio_detail_slider_button_default_color
title_text_color
portfolio_detail_text_color
can_compress_scripts
portfolio_pagination
...

Browser metrics Passed 4 tests

Checking browser requirements for Professional Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,031 ▲27013.58 ▼0.5920.90 ▲19.3151.47 ▲9.56
Dashboard /wp-admin2,239 ▲685.62 ▼0.13103.52 ▲9.0043.05 ▼1.61
Posts /wp-admin/edit.php2,165 ▲652.00 ▲0.0039.09 ▲2.0936.78 ▲0.99
Add New Post /wp-admin/post-new.php1,565 ▲3723.05 ▼0.04657.91 ▲11.6264.21 ▲12.20
Media Library /wp-admin/upload.php1,450 ▲564.25 ▲0.0897.70 ▼5.4143.90 ▼4.91
Add New /wp-admin/post-new.php?post_type=prof-portfolio2,6537.76193.7375.58
Professional Portfolio /wp-admin/edit.php?post_type=prof-portfolio1,1641.9832.1633.03
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_entries&post_type=prof-portfolio1,3242.1228.0330.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/professional-portfolio/professional-portfolio.php+40
    Non-static method PPORT_Deactivator::deactivate() should not be called statically
  • Zombie WordPress options detected upon uninstall: 24 options
    • portfolio_pagination
    • can_compress_scripts
    • portfolio_detail_bg_color
    • portfolio_detail_image_position
    • number_of_item_per_row_tablet
    • widget_recent-posts
    • title_text_color
    • widget_theysaidso_widget
    • portfolio_detail_slider_button_active_color
    • portfolio_display_page
    • ...

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 no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/professional-portfolio/classes/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/professional-portfolio/template/portfolio.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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
Please fix the following attributes: Please take inspiration from this readme.txt

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

The principal PHP file in "Professional Portfolio" v. 1.0.4 is loaded by WordPress automatically on each request
39 characters long description:
Display portfolio in your selected page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin27,316 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
SVG220018,863
HTML192,15904,767
PHP111741461,304
CSS22241451,204
JavaScript71631401,178

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods3685.71%
▷ Protected methods12.38%
▷ Private methods511.90%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
20 PNG files occupy 1.51MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/control.png1.38KB0.16KB▼ 88.37%
assets/fonts/roboto-fontfacekit/web fonts/roboto_boldcondensed_macroman/specimen_files/RobotoCondensed-Bold-cleartype.png84.75KB44.73KB▼ 47.23%
assets/fonts/roboto-fontfacekit/web fonts/roboto_thin_macroman/specimen_files/Roboto-Thin-cleartype.png78.75KB46.28KB▼ 41.24%
assets/fonts/roboto-fontfacekit/web fonts/roboto_medium_macroman/specimen_files/Roboto-Medium-cleartype.png84.64KB44.89KB▼ 46.96%
assets/fonts/roboto-fontfacekit/web fonts/roboto_lightcondenseditalic_macroman/specimen_files/RobotoCondensed-LightItalic-cleartype.png90.36KB55.31KB▼ 38.79%