78% wcd-portfolio

Code Review | WCD Portfolio

WordPress plugin WCD Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: wcd-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Oct 8, 2016
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: westcoastdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼3.89ms] Passed 4 tests

Analyzing server-side resources used by WCD Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4743.21 ▲3.55
Dashboard /wp-admin3.79 ▲0.4446.05 ▼15.48
Posts /wp-admin/edit.php3.84 ▲0.4849.18 ▲4.58
Add New Post /wp-admin/post-new.php6.31 ▲0.4284.55 ▼7.66
Media Library /wp-admin/upload.php3.65 ▲0.4238.57 ▲4.05
All Portfolio Items /wp-admin/edit.php?post_type=portfolio3.7643.23
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=portfolio3.6438.03
Add New /wp-admin/post-new.php?post_type=portfolio3.8050.05
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.7134.94

Server storage [IO: ▲0.16MB] [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, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
category_children
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WCD Portfolio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲9313.21 ▼1.384.50 ▲2.3438.83 ▼5.26
Dashboard /wp-admin2,262 ▲745.84 ▲0.9399.04 ▼16.6544.02 ▲2.04
Posts /wp-admin/edit.php2,156 ▲702.09 ▲0.1042.77 ▲7.6240.55 ▲6.59
Add New Post /wp-admin/post-new.php1,563 ▲3017.60 ▼5.50679.80 ▼32.9159.04 ▼2.85
Media Library /wp-admin/upload.php1,449 ▲614.25 ▲0.0797.82 ▼14.3844.76 ▼2.10
All Portfolio Items /wp-admin/edit.php?post_type=portfolio1,1671.9935.5834.72
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=portfolio1,5102.3335.4941.19
Add New /wp-admin/post-new.php?post_type=portfolio1,7723.5667.0636.50
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9902.0625.1929.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • category_children
    • widget_recent-comments

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.js.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wcd-portfolio/wcd-portfolio-metaboxes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wcd-portfolio/single-portfolio.php:1
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 9
    • > PHP Notice
      Trying to get property 'image_size' of non-object in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 7
    • > PHP Notice
      Trying to get property 'show_date' of non-object in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 10
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wcd-portfolio/wcd-portfolio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wcd-portfolio/wcd-portfolio-cpt.php:56
    • > PHP Notice
      Trying to get property 'portfolio_link' of non-object in wp-content/plugins/wcd-portfolio/assets/wcd-portfolio-grid/includes/frontend.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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 require attention:
  • Screenshots: Add descriptions for screenshots #2, #3, #4, #5 in wcd-portfolio/assets to your readme.txt
Please take inspiration from this readme.txt

wcd-portfolio/wcd-portfolio.php Passed 13 tests

The entry point to "WCD Portfolio" version 1.0 is a PHP file that has certain tags in its header comment area
38 characters long description:
Add a lightbox portfolio to your site.

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 detected2,663 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP85471,6322,086
JavaScript154101404
CSS23530173

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity42.25
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods102
▷ Static methods54.90%
▷ Public methods7977.45%
▷ Protected methods2322.55%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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 images were found in this plugin