84% wp-portfolio-showcase

Code Review | WP Portfolio Showcase

WordPress plugin WP Portfolio Showcase scored 84% from 54 tests.

About plugin

  • Plugin page: wp-portfolio-show...
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.3
  • WordPress version: 5.9.2
  • First release: Oct 11, 2019
  • Latest release: Oct 12, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: princeahmed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 549 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
Installer ran successfully

Server metrics [RAM: ▲1.04MB] [CPU: ▼286.01ms] Passed 4 tests

An overview of server-side resources used by WP Portfolio Showcase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2062.77 ▲8.10
Dashboard /wp-admin4.71 ▲1.3043.84 ▲11.25
Posts /wp-admin/edit.php5.00 ▲1.3648.45 ▲10.71
Add New Post /wp-admin/post-new.php8.27 ▲1.27108.68 ▼1,174.08
Media Library /wp-admin/upload.php4.66 ▲1.3636.73 ▲12.90
Add New Portfolio /wp-admin/post-new.php?post_type=portfolio5.0056.42
Settings /wp-admin/edit.php?post_type=portfolio&page=wp-portfolio-showcase-settings4.6738.63
All Portfolio /wp-admin/edit.php?post_type=portfolio4.7036.50
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio4.6534.97

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 4 new options
New WordPress options
prince_media_post_ID
wp_portfolio_showcase_settings
wp_portfolio_showcase_page
wp_portfolio_showcase_prince_settings

Browser metrics Passed 4 tests

An overview of browser requirements for WP Portfolio Showcase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲20816.52 ▲0.4913.00 ▲6.852.17 ▼0.67
Dashboard /wp-admin2,939 ▲786.15 ▼0.02120.58 ▼16.45158.29 ▼8.47
Posts /wp-admin/edit.php2,735 ▲473.25 ▲0.0063.02 ▼1.26138.73 ▼0.47
Add New Post /wp-admin/post-new.php1,721 ▲4916.73 ▼4.47435.42 ▲11.60172.04 ▼0.38
Media Library /wp-admin/upload.php1,743 ▲455.53 ▲0.09162.37 ▲10.19191.21 ▲5.96
Add New Portfolio /wp-admin/post-new.php?post_type=portfolio3,38610.38226.41215.71
Settings /wp-admin/edit.php?post_type=portfolio&page=wp-portfolio-showcase-settings1,5225.1283.68129.06
All Portfolio /wp-admin/edit.php?post_type=portfolio1,4202.9262.86114.48
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio1,6612.7756.95112.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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 4 options in the database
    • wp_portfolio_showcase_settings
    • wp_portfolio_showcase_prince_settings
    • prince_media_post_ID
    • wp_portfolio_showcase_page

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please take a closer look at the following
  • 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/wp-portfolio-showcase/includes/prince-settings/includes/admin-functions.php:1703
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-portfolio-showcase/uninstall.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
7 plugin tags: gallery, portfolio, filterable portfolio, portfolio plugin wordpress, best portfolio...

wp-portfolio-showcase/wp-portfolio-showcase.php Passed 13 tests

The entry point to "WP Portfolio Showcase" version 0.0.1 is a PHP file that has certain tags in its header comment area
31 characters long description:
Create Your Portfolio Showcase.

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
There were no executable files found in this plugin6,152 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP232,6543,2205,672
CSS48219465
JavaScript601215

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity29.11
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods69
▷ Static methods68.70%
▷ Public methods6086.96%
▷ Protected methods22.90%
▷ Private methods710.14%
Functions152
▷ Named functions14796.71%
▷ Anonymous functions53.29%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/prince-settings/assets/left-sidebar.png3.90KB2.09KB▼ 46.31%
includes/prince-settings/assets/prince-select.png1.03KB0.14KB▼ 86.03%
includes/prince-settings/assets/left-dual-sidebar.png3.83KB2.06KB▼ 46.34%
includes/prince-settings/assets/right-dual-sidebar.png3.86KB2.08KB▼ 46.18%
includes/prince-settings/assets/dual-sidebar.png3.88KB2.09KB▼ 46.20%