83% zillaportfolio

Code Review | Zilla Portfolio

WordPress plugin Zilla Portfolio scored 83% from 54 tests.

About plugin

  • Plugin page: zillaportfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Mar 31, 2016
  • Number of updates: 7
  • Update frequency: every 115.3 days
  • Top authors: mbsatunc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active / 12,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.72ms] Passed 4 tests

Analyzing server-side resources used by Zilla Portfolio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.07 ▼5.35
Dashboard /wp-admin3.49 ▲0.1845.10 ▼4.85
Posts /wp-admin/edit.php3.60 ▲0.2550.02 ▼1.47
Add New Post /wp-admin/post-new.php6.09 ▲0.2196.49 ▼3.19
Media Library /wp-admin/upload.php3.41 ▲0.1839.82 ▲5.31
Portfolio Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio3.4036.64
Portfolio Posts /wp-admin/edit.php?post_type=portfolio3.4640.30
Add New /wp-admin/post-new.php?post_type=portfolio3.5654.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zilla Portfolio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲25914.32 ▼0.0610.62 ▲8.5441.31 ▼3.28
Dashboard /wp-admin2,242 ▲544.84 ▼1.0697.57 ▼7.3539.84 ▼2.45
Posts /wp-admin/edit.php2,122 ▲332.05 ▲0.0039.36 ▼4.0536.13 ▲1.20
Add New Post /wp-admin/post-new.php1,547 ▲2423.39 ▲0.31624.60 ▲36.0032.30 ▼17.31
Media Library /wp-admin/upload.php1,412 ▲244.19 ▲0.0490.42 ▼9.4942.35 ▼3.94
Portfolio Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio1,2952.1425.5627.97
Portfolio Posts /wp-admin/edit.php?post_type=portfolio1,1281.9930.8227.11
Add New /wp-admin/post-new.php?post_type=portfolio2,9697.96179.8676.70

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zillaportfolio/includes/functions.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zillaportfolio/includes/admin/admin.php:20

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 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

zillaportfolio/zilla-portfolio.php 85% from 13 tests

The main file in "Zilla Portfolio" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("zillaportfolio.php" instead of "zilla-portfolio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,123 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8119384666
PO File17478174
JavaScript13317163
CSS1240120

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/portfolio-icon.png0.85KB1.11KB0.00%
assets/img/portfolio-32x32.png0.88KB0.96KB0.00%