89% wpmk-portfolio

Code Review | WPMK Portfolio

WordPress plugin WPMK Portfolio scored89%from 54 tests.

About plugin

  • Plugin page: wpmk-portfolio
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Oct 26, 2021
  • Number of updates: 5
  • Update frequency: every 228.0 days
  • Top authors: wpmkorg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 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
Install script ran successfully

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

Analyzing server-side resources used by WPMK Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.95 ▲0.54
Dashboard /wp-admin3.44 ▲0.1449.63 ▼0.38
Posts /wp-admin/edit.php3.56 ▲0.2053.69 ▼2.21
Add New Post /wp-admin/post-new.php6.03 ▲0.1496.77 ▼0.80
Media Library /wp-admin/upload.php3.36 ▲0.1435.13 ▼0.78
Add New Portfolio /wp-admin/post-new.php?post_type=wpmk-portfolio3.4954.64
WPMK Portfolio /wp-admin/edit.php?post_type=wpmk-portfolio3.4140.74
Category /wp-admin/edit-tags.php?taxonomy=wpmk-portfolio-category&post_type=wpmk-portfolio3.3636.31
Portfolio Settings /wp-admin/edit.php?post_type=wpmk-portfolio&page=wpmk-portfolio3.3638.34
Tags /wp-admin/edit-tags.php?taxonomy=wpmk-portfolio-tag&post_type=wpmk-portfolio3.3637.02

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 18 new options
New WordPress options
wpmk_portfolio_animate_delay
wpmk_portfolio_animate_status
wpmk_portfolio_templates
widget_recent-comments
wpmk_portfolio_template_css
widget_theysaidso_widget
wpmk_portfolio_filter_sort
db_upgraded
wpmk_portfolio_enable_filter
wpmk_portfolio_current_animate_speed
...

Browser metrics Passed 4 tests

A check of browser resources used by WPMK Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20113.62 ▼0.736.11 ▲4.3745.02 ▼1.79
Dashboard /wp-admin2,258 ▲674.91 ▼0.97112.18 ▲7.5043.42 ▼0.51
Posts /wp-admin/edit.php2,141 ▲522.03 ▲0.0342.18 ▲1.0934.13 ▼3.23
Add New Post /wp-admin/post-new.php1,557 ▲2923.21 ▲5.03626.09 ▼13.2450.15 ▼16.25
Media Library /wp-admin/upload.php1,434 ▲464.25 ▲0.03103.55 ▲5.0545.27 ▲5.09
Add New Portfolio /wp-admin/post-new.php?post_type=wpmk-portfolio2,4497.88194.4070.27
WPMK Portfolio /wp-admin/edit.php?post_type=wpmk-portfolio1,1241.9429.9830.82
Category /wp-admin/edit-tags.php?taxonomy=wpmk-portfolio-category&post_type=wpmk-portfolio1,3082.1528.7326.92
Portfolio Settings /wp-admin/edit.php?post_type=wpmk-portfolio&page=wpmk-portfolio1,4102.0423.3433.40
Tags /wp-admin/edit-tags.php?taxonomy=wpmk-portfolio-tag&post_type=wpmk-portfolio1,2832.1527.5427.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Version format is invalid
  • Screenshots: These screenshots require images: #1 (3 Column Grid View), #2 (4 Column Grid View), #3 (Admin Screen)
The official readme.txt might help

wpmk-portfolio/wpmk-portfolio.php 85% from 13 tests

"WPMK Portfolio" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 246 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
Everything looks great! No dangerous files found in this plugin973 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13161359765
CSS528196
JavaScript12012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 2.09MB with 1.56MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png814.20KB180.97KB▼ 77.77%
screenshot-3.png455.20KB145.88KB▼ 67.95%
screenshot-1.png873.83KB196.72KB▼ 77.49%