83% wp-design-portfolio

Code Review | WP Design Portfolio

WordPress plugin WP Design Portfolio scored83%from 54 tests.

About plugin

  • Plugin page: wp-design-portfolio
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Sep 22, 2020
  • Number of updates: 24
  • Update frequency: every 77.2 days
  • Top authors: mamun3d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,140 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: ▲0.02MB] [CPU: ▼6.92ms] Passed 4 tests

A check of server-side resources used by WP Design Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.20 ▲1.55
Dashboard /wp-admin3.34 ▼0.0148.61 ▼9.05
Posts /wp-admin/edit.php3.39 ▲0.0347.61 ▼2.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.23 ▼12.87
Media Library /wp-admin/upload.php3.26 ▲0.0332.04 ▼3.77
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio3.3534.09
Portfolio /wp-admin/edit.php?post_type=portfolio3.3033.62
Add New /wp-admin/post-new.php?post_type=portfolio3.3847.57

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Design Portfolio: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.47 ▼0.8210.35 ▲8.7844.79 ▲0.88
Dashboard /wp-admin2,229 ▲525.61 ▲0.0192.71 ▲6.3242.37 ▼2.89
Posts /wp-admin/edit.php2,131 ▲312.01 ▲0.0733.51 ▼2.5934.27 ▼2.24
Add New Post /wp-admin/post-new.php1,552 ▲2623.39 ▲0.38682.11 ▲12.6061.43 ▼0.81
Media Library /wp-admin/upload.php1,431 ▲284.17 ▼0.0595.40 ▼2.3942.84 ▼3.45
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio1,3052.1225.8428.38
Portfolio /wp-admin/edit.php?post_type=portfolio1,1041.9829.1229.28
Add New /wp-admin/post-new.php?post_type=portfolio2,2957.71162.1860.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-design-portfolio/inc/wp-portfolio-shortcode.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Screenshot #3 (Limited shortcode) image required
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
The official readme.txt might help

wp-design-portfolio/wordpress-portfolio.php 77% from 13 tests

The main file in "WP Design Portfolio" v. 1.0.2 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: Please rename the main PHP file in this plugin to the plugin slug ("wp-design-portfolio.php" instead of "wordpress-portfolio.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected352 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP47980260
CSS28290
JavaScript1192

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png87.67KB56.07KB▼ 36.04%