84% ig-portfolio

Code Review | IG Portfolio

WordPress plugin IG Portfolio scored 84% from 54 tests.

About plugin

  • Plugin page: ig-portfolio
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 5.8.1
  • First release: Jun 19, 2014
  • Latest release: Dec 30, 2016
  • Number of updates: 79
  • Update frequency: every 11.7 days
  • Top authors: iografica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,096 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼131.71ms] 75% from 4 tests

Server-side resources used by IG Portfolio
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 946.16ms on /wp-admin/edit.php?post_type=project&page=ig-portfolio-getting-started)
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3150.36 ▲28.07
Dashboard /wp-admin3.34 ▲0.2857.31 ▲5.88
Posts /wp-admin/edit.php3.38 ▲0.2763.95 ▲16.57
Add New Post /wp-admin/post-new.php5.64 ▲0.20104.21 ▼558.90
Media Library /wp-admin/upload.php3.22 ▲0.2247.31 ▲9.63
Settings /wp-admin/edit.php?post_type=project&page=ig-portfolio-settings-page3.1941.38
Category /wp-admin/edit-tags.php?taxonomy=portfolio&post_type=project3.2245.78
Getting Started /wp-admin/edit.php?post_type=project&page=ig-portfolio-getting-started3.34946.16
All Projects /wp-admin/edit.php?post_type=project3.2545.51
Add New /wp-admin/post-new.php?post_type=project3.4163.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 3 new options
New WordPress options
widget_ig_portfolio_project_widget
widget_ig_portfolio_project_details_widget
widget_ig_portfolio_categories_widget

Browser metrics Passed 4 tests

IG Portfolio: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,734 ▲16215.89 ▼0.119.25 ▼0.5647.28 ▼0.38
Dashboard /wp-admin3,020 ▲835.91 ▼0.14148.65 ▼25.48105.61 ▼9.03
Posts /wp-admin/edit.php2,789 ▲502.72 ▲0.0069.51 ▼1.6692.31 ▲5.39
Add New Post /wp-admin/post-new.php1,715 ▲3218.35 ▼0.34405.94 ▼43.45111.87 ▲6.25
Media Library /wp-admin/upload.php1,872 ▲655.03 ▼0.02172.44 ▲12.22116.29 ▲0.38
Settings /wp-admin/edit.php?post_type=project&page=ig-portfolio-settings-page1,1802.1060.9574.67
Category /wp-admin/edit-tags.php?taxonomy=portfolio&post_type=project1,8012.3763.4182.06
Getting Started /wp-admin/edit.php?post_type=project&page=ig-portfolio-getting-started1,5762.0658.60133.69
All Projects /wp-admin/edit.php?post_type=project1,5182.6574.1268.54
Add New /wp-admin/post-new.php?post_type=project3,8228.99242.45159.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 3 options in the database
    • widget_ig_portfolio_categories_widget
    • widget_ig_portfolio_project_details_widget
    • widget_ig_portfolio_project_widget

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ig-portfolio/extra/ig-portfolio-project-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-portfolio/welcome/sections/welcome-footer.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-portfolio/welcome/sections/welcome-intro.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-portfolio/welcome/welcome-screen.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-portfolio/includes/ig-portfolio-function.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ig-portfolio/extra/ig-portfolio-project-details-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ig-portfolio/extra/ig-portfolio-category-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ig-portfolio/extra/ig-portfolio-shortcodes.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-portfolio/welcome/sections/welcome-free-resources.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-portfolio/includes/ig-portfolio-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Project page), #2 (Portfolio page), #3 (Portfolio widgets and shortcodes)
The official readme.txt is a good inspiration

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

"IG Portfolio" version 2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
IG Portfolio is a clean and simply project showcase management system for WordPress.

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
Everything looks great! No dangerous files found in this plugin1,593 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP128299741
CSS2523331
Sass232288
PO File18494210
JavaScript10223

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.25
▷ Minimum class complexity5.00
▷ Maximum class complexity15.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin