84% mk-wordpress-portfolio

Code Review | MK Portfolio

WordPress plugin MK Portfolio scored 84% from 54 tests.

About plugin

  • Plugin page: mk-wordpress-port...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 14, 2017
  • Latest release: Nov 8, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: milankyada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 519 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.06ms] Passed 4 tests

An overview of server-side resources used by MK Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.53 ▲0.02
Dashboard /wp-admin3.34 ▲0.0352.01 ▲4.01
Posts /wp-admin/edit.php3.39 ▲0.0346.39 ▲1.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.59 ▼5.82
Media Library /wp-admin/upload.php3.26 ▲0.0337.42 ▲5.37
Add New /wp-admin/post-new.php?post_type=portfolio3.4255.78
CategoryOfWork /wp-admin/edit-tags.php?taxonomy=categoryofwork&post_type=portfolio3.2533.82
All Portfolios /wp-admin/edit.php?post_type=portfolio3.3038.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MK Portfolio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.22 ▼1.161.63 ▼0.1439.36 ▼9.80
Dashboard /wp-admin2,234 ▲515.79 ▲0.8894.16 ▼15.3339.16 ▼1.48
Posts /wp-admin/edit.php2,117 ▲282.01 ▲0.0134.17 ▼3.9134.41 ▲3.42
Add New Post /wp-admin/post-new.php1,546 ▲2723.12 ▼0.33657.05 ▼42.0461.79 ▼1.41
Media Library /wp-admin/upload.php1,419 ▲344.13 ▼0.09111.84 ▲4.4148.69 ▲2.69
Add New /wp-admin/post-new.php?post_type=portfolio2,5987.85168.9166.55
CategoryOfWork /wp-admin/edit-tags.php?taxonomy=categoryofwork&post_type=portfolio1,2962.1325.3626.96
All Portfolios /wp-admin/edit.php?post_type=portfolio1,1431.9429.7932.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/mk-wordpress-portfolio/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

mk-wordpress-portfolio/index.php 92% from 13 tests

"MK Portfolio" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mk-wordpress-portfolio.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,382 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25318422,169
PHP22413134
CSS114279

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected