10% web-developers-portfolio-plugin

Code Review | Web Developer's Portfolio

WordPress plugin Web Developer's Portfolio scored10%from 54 tests.

About plugin

  • Plugin page: web-developers-po...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6.2
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Mar 6, 2021
  • Number of updates: 26
  • Update frequency: every 54.0 days
  • Top authors: wpkaren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,398 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-cpt.php+91
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.78MB] [CPU: ▼52.89ms] Passed 4 tests

This is a short check of server-side resources used by Web Developer's Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.69 ▼31.29
Dashboard /wp-admin2.21 ▼1.147.56 ▼51.67
Posts /wp-admin/edit.php2.21 ▼1.158.66 ▼38.61
Add New Post /wp-admin/post-new.php2.21 ▼3.688.02 ▼89.97
Media Library /wp-admin/upload.php2.21 ▼1.027.92 ▼29.16
Add New /wp-admin/post-new.php?post_type=portfolio2.218.28
All Portfolio Items /wp-admin/edit.php?post_type=portfolio2.219.79

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

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

Browser metrics Passed 4 tests

Web Developer's Portfolio: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲7713.35 ▼1.031.80 ▼0.1645.29 ▲0.47
Dashboard /wp-admin2,249 ▲614.86 ▼0.0399.42 ▼21.3536.59 ▼7.15
Posts /wp-admin/edit.php2,132 ▲402.01 ▲0.0133.75 ▼2.9234.36 ▼1.67
Add New Post /wp-admin/post-new.php1,570 ▲3723.24 ▲0.11666.32 ▲18.4357.11 ▲3.69
Media Library /wp-admin/upload.php1,428 ▲404.27 ▲0.0195.97 ▼4.0242.10 ▼2.43
Add New /wp-admin/post-new.php?post_type=portfolio2,7129.09216.5378.96
All Portfolio Items /wp-admin/edit.php?post_type=portfolio1,1201.9329.3727.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-cpt.php+91
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-cpt.php+91
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/web-developers-portfolio-plugin/uninstall.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-public.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-cpt.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WDP_Plugin_CPT' not found in wp-content/plugins/web-developers-portfolio-plugin/inc/class-wdp-plugin-admin.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: images, post type, shortcode, portfolio

web-developers-portfolio-plugin/wdp-plugin.php 77% from 13 tests

The main PHP file in "Web Developer's Portfolio" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("web-developers-portfolio-plugin.php" instead of "wdp-plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 216 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
There were no executable files found in this plugin876 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7332151686
CSS1373143
JavaScript2331347

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods49.76%
▷ Public methods4097.56%
▷ Protected methods00.00%
▷ Private methods12.44%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected